[issue36863] argparse doesn't like options in the middle of arguments
paul j3
report at bugs.python.org
Mon May 27 16:14:23 EDT 2019
paul j3 <ajipanca at gmail.com> added the comment:
This is intended behavior of multi-nargs positionals. The 'one' string is consumed by the 'file' argument, and there's no positional argument left to consume the other strings.
The topic was raised and discussed previously
https://bugs.python.org/issue14191 -argparse doesn't allow optionals within positionals
The fix is to use 'parser.parse_intermixed_args()', as documented in
https://docs.python.org/3/library/argparse.html#intermixed-parsing
----------
nosy: +paul.j3
resolution: -> duplicate
stage: test needed -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36863>
_______________________________________
More information about the Python-bugs-list
mailing list