Skip to content

bpo-23378: Add an extend action to argparse #13305

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

Merged
merged 2 commits into from
May 21, 2019

Conversation

isidentical
Copy link
Member

@isidentical isidentical commented May 14, 2019

Add an extend action to argparse

https://bugs.python.org/issue23378

Copy link
Contributor

@asottile asottile left a comment

Choose a reason for hiding this comment

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

patch looks good, are there other nargs=... that this makes sense with? should it produce an error in the nonsensical cases? should it default to nargs='+'?

@isidentical
Copy link
Member Author

nargs=N doesn't make any sense (it doesn't need extend but extend can be used like append). but i dont think we should produce a ValueError etc.

Copy link
Contributor

@furkanonder furkanonder left a comment

Choose a reason for hiding this comment

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

Nice fix.

Copy link
Member

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

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

Yup!

@miss-islington
Copy link
Contributor

@isidentical: Status check is done, and it's a success ✅ .

@miss-islington miss-islington merged commit aa32a7e into python:master May 21, 2019
@isidentical isidentical deleted the issue23378 branch December 7, 2019 12:09
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

Successfully merging this pull request may close these issues.

7 participants