[issue16468] argparse only supports iterable choices
paul j3
report at bugs.python.org
Thu Jul 4 07:30:47 CEST 2013
paul j3 added the comment:
I'd suggest not worrying about the default metavar in the _expand_help() method. The formatted choice string created in that method is only used if the help line includes a '%(choices)s' string. The programmer can easily omit that if he isn't happy with the expanded list.
TestHelpVariableExpansion is the only test in test_argparse.py that uses it.
Sig('--foo', choices=['a', 'b', 'c'],
help='foo %(prog)s %(default)s %(choices)s')
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16468>
_______________________________________
More information about the Python-bugs-list
mailing list