-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Zero-valued flag enum has no name #118820
Comments
cc @ethanfurman. |
The zero-flag name is constructed from its members -- it just doesn't have any members. This could certainly be mentioned in the docs. |
I'll make a pull request with an example. |
It has been a month, does someone still need to review my pull request? |
ethanfurman
pushed a commit
that referenced
this issue
Jun 19, 2024
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jun 19, 2024
(cherry picked from commit ed5ae6c) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Jun 19, 2024
(cherry picked from commit ed5ae6c) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
mrahtz
pushed a commit
to mrahtz/cpython
that referenced
this issue
Jun 30, 2024
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
noahbkim
pushed a commit
to hudson-trading/cpython
that referenced
this issue
Jul 11, 2024
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
estyxx
pushed a commit
to estyxx/cpython
that referenced
this issue
Jul 17, 2024
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Documentation
Quoting
Doc/howto/enum.rst:1148
:This section was originally added in 7aaeb2a3.
If you have a zero-valued flag, and you didn't explicitly give it a name, this doesn't seem to apply, it returns
None
instead.I'm not entirely sure if this should be considered a documentation issue or a bug report (or both). It doesn't really feel like zero should be treated any differently from other unnamed combinations. But at the same time, I've tested, and this is already the existing behavior in 3.10 through 3.12, and it doesn't seem to be documented anywhere.
Linked PRs
The text was updated successfully, but these errors were encountered: