GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — enum.global_enum: `cls_name` undefined in `global_str` · Issue #93100 · python/cpython Closed Labels 3.11only security fixesonly security fixes3.12only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug report In acf7403 (#30582), @ethanfurman implemented a Lines 1638 to 1645 in 760ec89
(This was later reverted in 42a64c0 and reintroduced in 83d544b, but I believe the code to be the same). If the Here is a (somewhat contrived) example: import enum @enum.global_enum class EnumTest(enum.Enum): VAL = 1 EnumTest.VAL._name_ = None print(str(VAL)) this fails with: Traceback (most recent call last): File "/home/florian/tmp/x.py", line 9, in <module> print(str(VAL)) ^^^^^^^^ File "/usr/lib/python3.11/enum.py", line 1646, in global_str return "%s(%r)" % (cls_name, self._value_) ^^^^^^^^ NameError: name 'cls_name' is not defined (Found by running Your environment
Reacted by Marcel Guinhos Activity
MetadataMetadataAssigneesLabels3.11only security fixesonly security fixes3.12only security fixesonly security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error ProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |