-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
Enum creation from values fails for certain values. #116040
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
Comments
Reproducible with the latest 3.13 alpha (3.13.0a4). (3.11.8 gives |
In 3.11 you still have to use tuples; i.e. |
ethanfurman
added a commit
to ethanfurman/cpython
that referenced
this issue
Mar 7, 2024
…y; e.g. Cardinal(1, 0) (pythonGH-116072) (cherry picked from commit 13ffd4b)
ethanfurman
added a commit
that referenced
this issue
Mar 7, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Mar 11, 2024
* and fix _not_given usage (cherry picked from commit 3c0dcef) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
ethanfurman
added a commit
that referenced
this issue
Mar 11, 2024
adorilson
pushed a commit
to adorilson/cpython
that referenced
this issue
Mar 25, 2024
…y; e.g. Cardinal(1, 0) (pythonGH-116072)
adorilson
pushed a commit
to adorilson/cpython
that referenced
this issue
Mar 25, 2024
* and fix _not_given usage
This was referenced Apr 12, 2024
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
…y; e.g. Cardinal(1, 0) (pythonGH-116072)
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
* and fix _not_given usage
Scrxtchy
added a commit
to Scrxtchy/interactions.py
that referenced
this issue
Apr 18, 2024
As None is a valid value now, as of 3.12.3 it cannot be used for the name python/cpython#116040
Scrxtchy
added a commit
to Scrxtchy/interactions.py
that referenced
this issue
Apr 18, 2024
As None is a valid value now, as of 3.12.3 it cannot be used for the name python/cpython#116040
eightween
pushed a commit
to interactions-py/interactions.py
that referenced
this issue
Apr 20, 2024
As None is a valid value now, as of 3.12.3 it cannot be used for the name python/cpython#116040
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
Hello,
I tried to define an enum with custom initializer and tuple values, akin to the Planet example.
When instantiating this enum from values it works for some values (0, 1) but fails for others (1, 0).
I'm not quite sure if I'm allowed to construct this enum from separate x and y parameters or if I need to pass a tuple.
Either way, it should either work for both (up and right) cases or fail for both cases.
CPython versions tested on:
3.12
Operating systems tested on:
Windows
Linked PRs
The text was updated successfully, but these errors were encountered: