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
Python enum fails equality test against itself after reloading using importlib.reload
importlib.reload
Suppose we have a module:
# mod_enum.py import enum class E(enum.Enum): A = 'A'
In a Python shell:
>>> import importlib >>> import mod_enum >>> old_enum = mod_enum.E.A >>> id(old_enum) 140661148711472 >>> importlib.reload(mod_enum) <module 'mod_enum' from 'mod_enum.py'> >>> new_enum = mod_enum.E.A >>> id(new_enum) 140661156076320 >>> old_enum == new_enum False
The text was updated successfully, but these errors were encountered:
related #74730
Sorry, something went wrong.
No branches or pull requests
Bug report
Python enum fails equality test against itself after reloading using
importlib.reload
Suppose we have a module:
In a Python shell:
Your environment
The text was updated successfully, but these errors were encountered: