Skip to content

Conversation

@jameshcorbett
Copy link
Contributor

@jameshcorbett jameshcorbett commented Jun 20, 2020

The argparse.ArgumentParser sometimes rejects positional arguments with no arguments when choices is set and nargs="*". This PR would fix that, so they would never be rejected. This would make the behavior of positional arguments align with the behavior of optional arguments in this specific case.

https://bugs.python.org/issue41047

@csabella csabella requested a review from rhettinger June 20, 2020 12:37
@jameshcorbett jameshcorbett deleted the argparse-positionals-and-choices branch June 25, 2020 21:00
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