We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Assume this definition of Color:
Color
from enum import Enum class Color(Enum): red = 1 green = 2 blue = 3
Color['red'] works, and 'val : Color = Color['red']both work, butval = Color['red']` does not work:
Color['red']
both work, but
error: Name 'red' is not defined error: "Color" expects no type arguments, but 1 given
Reference #741
The text was updated successfully, but these errors were encountered:
Whoops, yes, definitely a bug. Not sure yet how to fix it.
Sorry, something went wrong.
disallow generic Enums and fix assigning Enum indexes
195f758
Fixes python#3137
disallow generic Enums and fix assigning Enum indexes (#3140)
745d300
* disallow generic Enums and fix assigning Enum indexes Fixes #3137 * add "x = E[1]" test
Successfully merging a pull request may close this issue.
Assume this definition of
Color
:Color['red']
works, and 'val : Color = Color['red']both work, but
val = Color['red']` does not work:Reference #741
The text was updated successfully, but these errors were encountered: