Skip to content

bpo-42385: [Enum] add _generate_next_value_ to StrEnum #23735

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 3 commits into from
Dec 10, 2020

Conversation

ethanfurman
Copy link
Member

@ethanfurman ethanfurman commented Dec 10, 2020

The default for auto() is to return an integer, which doesn't work for StrEnum.

https://bugs.python.org/issue42385

@ethanfurman ethanfurman changed the title Enum gnv 2 bpo-42385: [Enum] add _generate_next_value_ to StrEnum Dec 10, 2020
@ethanfurman ethanfurman merged commit efb13be into python:master Dec 10, 2020
@ethanfurman ethanfurman deleted the enum-gnv-2 branch December 10, 2020 20:20
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
)

The default for auto() is to return an integer, which doesn't work for `StrEnum`.  The new `_generate_next_value_` for `StrEnum` returns the member name, lower cased.
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.

3 participants