Skip to content

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

Closed as not planned
@rindeal

Description

@rindeal

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Doc issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions