[issue11874] argparse assertion failure with brackets in metavars

Vajrasky Kok report at bugs.python.org
Sun Jul 14 05:37:45 CEST 2013


Vajrasky Kok added the comment:

Attached the unit test.

Here is the simpler script to product the bug:

------------------------
import argparse
parser = argparse.ArgumentParser(prog='PROG')
parser.add_argument ('--a', metavar='a'*76)
parser.add_argument ('--b', metavar="[innerpart]outerpart")
parser.add_argument ('c', metavar='c'*76)
parser.add_argument ('d', metavar="[innerpart2]outerpart2")
args = parser.parse_args()
------------------------

python thefile.py --help

----------
nosy: +vajrasky
Added file: http://bugs.python.org/file30910/unit_test_for_inner_bracket_metavar.txt

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


More information about the Python-bugs-list mailing list