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 `auto()` functionally fails following alias creation · Issue #91456 · python/cpython Closed Labels stdlibStandard 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 DescriptionWhat is the issue?The base Why is it problematic?For a user employing Given the following code: from enum import Enum, auto class Example(Enum): A = auto() B = auto() C = A D = auto() the expectation is that >>> print(Example.A) Example.A >>> print(Example.B) Example.B >>> print(Example.C) Example.A >>> print(Example.D) ### UNEXPECTED! Example.B effectively rendering Suggested CauseUpon closer inspection, the reason seems to be that the base Lines 1171 to 1186 in a8abb76
Current WorkaroundAt the moment, to workaround this issue, the user can:
This issue only affects code that combines the use of def _generate_next_value_(name, start, count, last_values): # for last_value in reversed(last_values): for last_value in sorted(last_values, reverse=True): try: return last_value + 1 except TypeError: pass else: return start Activity
MetadataMetadataAssigneesLabelsstdlibStandard 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. |