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

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

monkeyman79
Copy link

@monkeyman79 monkeyman79 commented Jan 29, 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

Copy of #24259 which I unwittingly closed by renaming the branch.

https://bugs.python.org/issue42973

monkeyman79 and others added 7 commits January 19, 2021 21:09
Allow positional parameter with nargs='*' to match more than once without reordering parameters. Restoration of old patch from bpo-14191.
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
@github-actions
Copy link

github-actions bot commented Mar 1, 2021

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Mar 1, 2021
Copy link
Contributor

@MaxwellDupre MaxwellDupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran 1658 tests in 3.084s
OK
Looks ok.

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Aug 3, 2022
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.

5 participants