[issue13922] argparse handling multiple "--" in args improperly
paul j3
report at bugs.python.org
Sun Apr 14 08:48:18 CEST 2013
paul j3 added the comment:
This patch removes only one '--', the one that put a '-' in the 'arg_strings_pattern'. It does this in 'consume_positionals' right before calling 'take_action'. As before it does not do this if nargs is PARSER or REMAINDER.
test_argparse.py has two DoubleDashRemoval cases, that attempt to highlight the changes from production (delete all --) and development (delete first -- in each positional group) versions.
I have not made any changes to the documentation. All it says now is:
"If you have positional arguments that must begin with - and don’t look like negative numbers, you can insert the pseudo-argument '--' which tells parse_args() that everything after that is a positional argument:"
----------
Added file: http://bugs.python.org/file29845/dbldash.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13922>
_______________________________________
More information about the Python-bugs-list
mailing list