mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
[3.12] gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104279)
gh-104271: Fix auto() fallback in case of mixed type Enum
This commit is contained in:
parent
9aea1f28e2
commit
f4e2049f14
2 changed files with 5 additions and 2 deletions
|
@ -1185,7 +1185,7 @@ class Enum(metaclass=EnumType):
|
|||
DeprecationWarning,
|
||||
stacklevel=3,
|
||||
)
|
||||
for v in last_values:
|
||||
for v in reversed(last_values):
|
||||
try:
|
||||
return v + 1
|
||||
except TypeError:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue