We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Bug report
The str() method on Python 3.11.0b4 is outputting the raw integer value not the class name and label that older Python versions do.
str()
import enum class MyEnum(enum.IntEnum): TEST = 1 assert str(MyEnum.TEST) == "MyEnum.TEST", f"Actual '{MyEnum.TEST}'"
On Python 3.10 (and older Python 3 versions) this assertion is true. On python 3.11.0b4 the str value is just 1.
1
The repr() is the same as on older versions, just seems like str() is affected.
repr()
Your environment
Bug report
The
str()method on Python 3.11.0b4 is outputting the raw integer value not the class name and label that older Python versions do.On Python 3.10 (and older Python 3 versions) this assertion is true. On python 3.11.0b4 the str value is just
1.The
repr()is the same as on older versions, just seems likestr()is affected.Your environment