[issue43046] argparse: capturing actions

Raymond Hettinger report at bugs.python.org
Thu Jan 28 00:10:26 EST 2021


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

> capture mutual relationship between command line arguments for more
> advanced parsers, where order of command line arguments is meaningful

I don't think this is a pattern we should encourage.  It doesn't seem to arise often and it makes the API much more complex for end users.

Also, I'm concerned that adding more action classes will make argparse harder to learn for the average user.  Already, the module suffers from sprawl and has unexpected interactions between the components.  The docs and tutorial are voluminous and hard to digest in a single sitting.

ISTM the scope of argparse was never intended to capture all possible patterns for command line argument parsing.  Instead, it aimed at to address the common cases.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43046>
_______________________________________


More information about the Python-bugs-list mailing list