[issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional

paul j3 report at bugs.python.org
Wed Sep 3 22:45:33 CEST 2014


paul j3 added the comment:

http://bugs.python.org/issue14191
'argparse doesn't allow optionals within positionals'

implements a 'parse_intermixed_args()' method, which parses all of the optionals with one pass, followed by a second pass that handles the positionals.  It does this by temporarily deactivating the positionals for the first pass.  It emulates the optparse behavior (with the added ability to parse positionals).

This is too big of a change to ever become the default behavior for argparse.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15112>
_______________________________________


More information about the Python-bugs-list mailing list