[issue9348] Calling argparse's add_argument with the wrong number of metavars causes delayed error message

Steven Bethard report at bugs.python.org
Wed Aug 4 10:56:34 CEST 2010


Steven Bethard <steven.bethard at gmail.com> added the comment:

You can specify either 1 or N. So for n=3, you can specify metavar="X" or metavar=("X", "Y", "Z") but not metavar=("X", "Y"). The special nargs value "?" always takes only one, while "*" and "+" always take two. (This makes sense if you think about how they're formatted, e.g. "X [X ...]".)

----------

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


More information about the Python-bugs-list mailing list