This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients asvetlov, eric.smith, paul.j3, r.david.murray, shubham1172, steven.daprano
Date 2018-01-09.07:00:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1515481218.24.0.467229070634.issue32474@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2018-01-09 07:00:18paul.j3setrecipients: + paul.j3, eric.smith, steven.daprano, r.david.murray, asvetlov, shubham1172
2018-01-09 07:00:18paul.j3setmessageid: <1515481218.24.0.467229070634.issue32474@psf.upfronthosting.co.za>
2018-01-09 07:00:18paul.j3linkissue32474 messages
2018-01-09 07:00:17paul.j3create