[issue13922] argparse handling multiple "--" in args improperly

paul j3 report at bugs.python.org
Fri Apr 5 18:40:01 CEST 2013


paul j3 added the comment:

There are several problems with the patch provided in msg156315

This description:

"Added patch so that only the first '--' is removed by an argparse.PARSE or argparse.REMAINDER argument."

should read

"Added patch so that only the first '--' is removed by arguments that are not argparse.PARSER or argparse.REMAINDER ."

The test that adds a third subparser with a nargs='...' argument does not test this change.   It exercises both nargs types that are not affected by the change in argparse.py.  As such older versions of argparse pass this test.

I thinking argparse.py change is correct (delete only the 1st '--'), though I'm not sure it addresses the concern of the original poster.

----------
nosy: +paul.j3

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


More information about the Python-bugs-list mailing list