[issue11354] argparse: nargs could accept range of options count

paul j3 report at bugs.python.org
Sat Nov 30 05:54:14 CET 2013


paul j3 added the comment:

With a minor tweak to `argparse._is_mnrep()`, `nargs='{3}'` would also work.  This means the same as `nargs=3`, so it isn't needed.  But it is consistent with the idea of accepting Regular Expression syntax where it makes sense.  `nargs='{2,3}?'` also works, though I think that's just the same as `nargs=2`.

----------

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


More information about the Python-bugs-list mailing list