[Python-ideas] Re: Simple feature for argparse.py

2019-10-10 Thread Andrew Barnert via Python-ideas
On Oct 9, 2019, at 20:56, Chris Angelico wrote: > > What you may want to consider is backporting the exact argparse.py > from Python 3.7. It's a fairly straight-forward module and will > probably work fine on 3.6. That way, once you upgrade to 3.7, it'll > keep working the exact same way. The ar

[Python-ideas] Re: Simple feature for argparse.py

2019-10-10 Thread Stephen J. Turnbull
brent bejot writes: > Sigh, well at least I know it was a good idea! Thanks so much! As I was telling potential advisees a few minutes ago, it's not getting the right answer that gets you a Nobel Prize, it's asking the right question! You'll find more good ideas, I'm sure. Steve -- Associat

[Python-ideas] Re: Simple feature for argparse.py

2019-10-09 Thread Chris Angelico
On Thu, Oct 10, 2019 at 2:37 PM brent bejot wrote: > > > > On Wed, Oct 9, 2019 at 11:01 PM Ryan Gonzalez wrote: >> >> I believe you want Python 3.7's parse_intermixed_args: >> https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.parse_intermixed_args >> >> A quick test seems t

[Python-ideas] Re: Simple feature for argparse.py

2019-10-09 Thread brent bejot
On Wed, Oct 9, 2019 at 11:01 PM Ryan Gonzalez wrote: > I believe you want Python 3.7's parse_intermixed_args: > https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.parse_intermixed_args > > A quick test seems to work: > > > import argparse > > p = argparse.ArgumentParser() > p

[Python-ideas] Re: Simple feature for argparse.py

2019-10-09 Thread Ryan Gonzalez
I believe you want Python 3.7's parse_intermixed_args: https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.parse_intermixed_args A quick test seems to work: import argparse p = argparse.ArgumentParser() p.add_argument('files', nargs='*') p.add_argument('-f', '--force', actio

[Python-ideas] Re: Simple feature for argparse.py

2019-10-09 Thread Chris Angelico
On Thu, Oct 10, 2019 at 1:50 PM brent bejot wrote: > > Hello all, > > Aspiring contributor here. I am not at all certain that this is the right > place to discuss this. Do refer me to a better location if I'm out of place. > This is the perfect place to discuss this! Welcome on in. > I would