[issue11874] argparse assertion failure with brackets in metavars

Matt Pr report at bugs.python.org
Mon Mar 21 04:33:19 EDT 2016


Matt Pr added the comment:

Same AssertionError is also caused by having certain "choices".

Python 2.7.10

global_options.add_argument('--field-sep', choices=[',',';','|','\t'], required=True, help='Field separator that separates columns in a row.')

Removing required=True or removing the tab (\t) from the options both work around this usage formatter issue for me.

I know this is an old issue but figured I would add another repro case to help whoever might work on this.

----------
nosy: +mattpr

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


More information about the Python-bugs-list mailing list