[issue32474] argparse nargs should support string wrapped integers too

2018-01-08 Thread paul j3
paul j3 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

[issue32474] argparse nargs should support string wrapped integers too

2018-01-01 Thread R. David Murray
R. David Murray added the comment: Agreed. I don't think there is sufficient motivation for doing this, and there are downsides as Eric has pointed out. Rejecting. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed

[issue32474] argparse nargs should support string wrapped integers too

2018-01-01 Thread Andrew Svetlov
Andrew Svetlov added the comment: -1 -- nosy: +asvetlov ___ Python tracker ___

[issue32474] argparse nargs should support string wrapped integers too

2018-01-01 Thread Shubham Sharma
Change by Shubham Sharma : -- pull_requests: +4949 ___ Python tracker ___ ___

[issue32474] argparse nargs should support string wrapped integers too

2018-01-01 Thread Eric V. Smith
Change by Eric V. Smith : -- versions: -Python 3.8 ___ Python tracker ___ ___

[issue32474] argparse nargs should support string wrapped integers too

2018-01-01 Thread Shubham Sharma
Change by Shubham Sharma : -- keywords: +patch pull_requests: +4944 stage: -> patch review ___ Python tracker ___

[issue32474] argparse nargs should support string wrapped integers too

2017-12-31 Thread Shubham Sharma
Shubham Sharma added the comment: nargs can take various values like "*", "+", etc. but doesn't support integers which are wrapped around in strings. Say, I want to take a user input for the nargs value (just a hypothetical situation); now I'll have to check

[issue32474] argparse nargs should support string wrapped integers too

2017-12-31 Thread R. David Murray
R. David Murray added the comment: Why? What's the motivation for supporting this? There's no reason that I can think of, so I'm curious what your use case is. -- nosy: +r.david.murray ___ Python tracker

[issue32474] argparse nargs should support string wrapped integers too

2017-12-31 Thread Steven D'Aprano
Steven D'Aprano added the comment: > Values like "1", "2", "3", should be supported. You mean you want to call parser.add_argument('--foo', nargs="2") instead of parser.add_argument('--foo', nargs=2)? Why? -- ___

[issue32474] argparse nargs should support string wrapped integers too

2017-12-31 Thread Shubham Sharma
Shubham Sharma added the comment: A simple int(nargs) would be sufficient. I am getting ready with a PR in some time. -- ___ Python tracker

[issue32474] argparse nargs should support string wrapped integers too

2017-12-31 Thread Shubham Sharma
Shubham Sharma added the comment: Values like "1", "2", "3", should be supported. -- ___ Python tracker ___

[issue32474] argparse nargs should support string wrapped integers too

2017-12-31 Thread Steven D'Aprano
New submission from Steven D'Aprano : What do you mean by "string wrapped integers", and how should it support them? -- nosy: +steven.daprano ___ Python tracker

[issue32474] argparse nargs should support string wrapped integers too

2017-12-31 Thread Shubham Sharma
Change by Shubham Sharma : -- components: Library (Lib) nosy: shubham1172 priority: normal severity: normal status: open title: argparse nargs should support string wrapped integers too type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python