Sitelet https://web.archive.org/web/20250904011145/https://github.com/python/cpython/pull/24259
Skip to content

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