[issue42973] argparse: mixing optional and positional arguments... not again

Tadek Kijkowski report at bugs.python.org
Wed Jan 27 08:15:14 EST 2021


Tadek Kijkowski <tkijkowski at gmail.com> added the comment:

I went with Paul's suggestion and added nargs='**' instead of greedy, so at this moment this PR doesn't introduce any changes in any public signatures.

I'm working on 'capture' actions, but I want that to be a separate PR and a separate issue because - first - it may be harder to accept as it is bigger change in both code and documentation and - second - it actually is a separate feature, which could be useful for optional arguments even without nargs='**' implemented.

So, what do you all think about this PR as it now? Docs and tests are updated.

----------

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


More information about the Python-bugs-list mailing list