Skip to content

bpo-42973: argparse: mixing optional and positional #24259

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

Closed
wants to merge 7 commits into from

Conversation

monkeyman79
Copy link

@monkeyman79 monkeyman79 commented Jan 19, 2021

argparse: allow positional parameter with nargs='*' to match more than once without reordering parameters.
Restoration of old patch from bpo-14191.

https://bugs.python.org/issue42973

Allow positional parameter with nargs='*' to match more than once without reordering parameters. Restoration of old patch from bpo-14191.
monkeyman79 and others added 6 commits January 25, 2021 20:58
New parameter to ArgumentParser constructor - 'greedy' makes positional
parameters consume multiple groups of command-line arguments.

Added tests and docs.
Fixed silly mistake in example in docs.
Removed 'greedy' parameter, added nargs='**'
Restored original ArgumentParser signature in argparse.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants