[issue32474] argparse nargs should support string wrapped integers too
paul j3
report at bugs.python.org
Tue Jan 9 02:00:18 EST 2018
paul j3 <ajipanca at gmail.com> added the comment:
In https://bugs.python.org/issue11354
'argparse: nargs could accept range of options count'
I explored the option allowing regex style range arguments, such as nargs='{2,4}' or an equivalent tuple nargs=(2,4).
But that builds on https://bugs.python.org/issue9849, which seeks better error checking of the `nargs` parameter. In the current implementation, there is no checking or parsing of the value. The full range of allowable values is determined by its use in 2 methods:
_get_nargs_pattern
_format_args
----------
nosy: +paul.j3
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32474>
_______________________________________
More information about the Python-bugs-list
mailing list