[issue14074] argparse allows nargs>1 for positional arguments but doesn't allow metavar to be a tuple
paul j3
report at bugs.python.org
Sat Apr 26 08:35:03 CEST 2014
paul j3 added the comment:
oops - to fix the error message that OP complained about, I need to patch '_get_action_name' as well:
def _get_action_name(argument):
...
elif argument.metavar not in (None, SUPPRESS):
metavar = argument.metavar
if isinstance(metavar, tuple):
metavar = '|'.join(metavar)
return metavar
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14074>
_______________________________________
More information about the Python-bugs-list
mailing list