-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
adjust enum.auto's behavior for StrEnum to return the enum name #86551
Comments
Currently, enum.auto doesn't work with the new (Py3.10) StrEnum: I would guess that the most reasonable behavior for auto() in a StrEnum would be to return the name itself, as implemented in the AutoName example at https://docs.python.org/3.10/library/enum.html#using-automatic-values. I believe that this may just be a matter of copying the corresponding |
A good idea. Since the Python opinion of enum members is that they be upper-cased, and every magic string constant I have seen is lower-case, |
Thank you for finding that, Antony. |
Thanks for implementing! |
_generate_next_value_
to StrEnum #23735Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: