Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argparse doesn't allow optionals within positionals #60

Closed
hpaulj opened this issue Apr 25, 2013 · 1 comment
Closed

argparse doesn't allow optionals within positionals #60

hpaulj opened this issue Apr 25, 2013 · 1 comment

Comments

@hpaulj
Copy link

hpaulj commented Apr 25, 2013

Python issue http://bugs.python.org/issue14191

Some unix coders are used to freely intermixing optionals and positionals. optparse, which argparse is supposed to replace, parses all of the optionals, and puts everything else in an extras array. This is like parseKnownArgs but with freer intermixing.

A proposed solution is to write a parser.parseIntermixedArgs that does a 2 step parse, first parse the input with only the conditionals arguments, and then parse the extras with the positionals.

@rlidwka
Copy link
Member

rlidwka commented Aug 14, 2020

parse_intermixed_args is ported from python as part of argparse.js 2.0

@rlidwka rlidwka closed this as completed Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants