[issue9338] argparse optionals with nargs='?', '*' or '+' can't be followed by positionals
paul j3
report at bugs.python.org
Tue Oct 22 04:55:49 CEST 2013
paul j3 added the comment:
parse_args() would see ['-foo', 'bar1,bar2,bar3', 'pos1', 'pos2']. The splitting on space is done by the shell. So having your own code split 'bar1,bar2,bar3' is simplest. But that would be messed up if the user entered 'bar1, bar2, bar3...'. You could also ask the user to use quotes - "bar1, bar2, bar3".
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9338>
_______________________________________
More information about the Python-bugs-list
mailing list