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

argparse: when wrong choice is selected, the error message prints available choices using repr() instead of str() #118839

Open
rindeal opened this issue May 9, 2024 · 0 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@rindeal
Copy link
Contributor

rindeal commented May 9, 2024

Bug report

Bug description:

I tried using StrEnum for choices and it printed choose from <Enum.FOO: 'foo'>, ... instead of choose from foo, .....

Fix in #117766

CPython versions tested on:

3.12

Operating systems tested on:

Linux

Linked PRs

@rindeal rindeal added the type-bug An unexpected behavior, bug, or error label May 9, 2024
rindeal added a commit to rindeal/python--cpython--dev-fork that referenced this issue May 9, 2024
Fixes: python#118839

Signed-off-by: Jan Chren (rindeal) <dev.rindeal@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
Status: No status
Development

No branches or pull requests

1 participant