You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, no matter how many arguments an optional takes, they're all
named the same::
>>> parser = argparse.ArgumentParser(prog='PROG', add_help=False)
>>> parser.add_argument('-c', nargs=2, metavar='X')
>>> parser.print_help()
usage: PROG [-c X X]
optional arguments:
-c X X
It would be nice to have multiple names sometimes (e.g. "X Y" instead of "X
X" above).
Perhaps this could be achieved by allowing metavar to be a sequence as well
as a string. I'm a little nervous though about the typecheck necessary to
distinguish between strings and other sequences, and the fact that you'd
need to check that the length of the sequence and the nargs value matched.
Original issue reported on code.google.com by steven.b...@gmail.com on 28 Mar 2009 at 2:17
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
steven.b...@gmail.com
on 28 Mar 2009 at 2:17The text was updated successfully, but these errors were encountered: