New submission from Sylvia van Os:
If main imports another file, and this file imports an Enum class from main,
isinstance will return false for Enum variables set in this file, causing the
Enums to never match.
A proof of concept is added as a zip. I thank Kwpolska for simplifying my
Sylvia van Os added the comment:
For what it's worth, I am not opposed to having this issue closed. As I am new
to reporting anything on the Python issue tracker and was uncertain on how
relevant the PEP in question was, I figured it would be better to report this
anyway just in
Sylvia van Os added the comment:
Importing it from a third module indeed works without issues and makes both
isinstance() calls return True, yes.
--
___
Python tracker
<http://bugs.python.org/issue27
Changes by Sylvia van Os :
Removed file:
http://bugs.python.org/file43867/a040de8b978dcc4c272c0571d456a382-ea6d8fb8acc988a1f060c94070f70a6ed8439069.zip
___
Python tracker
<http://bugs.python.org/issue27
Sylvia van Os added the comment:
My apologies, I can't get that test case to run here either. Here is a slightly
older one that does reproduce the issue too.
I specifically run it with python3 main.py.
--
Added file: http://bugs.python.org/file43877/issue2760