summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-05-23 19:48:20 (GMT)
committerGitHub <noreply@github.com>2023-05-23 19:48:20 (GMT)
commit582aadc80e566fe8ab9b15d4d221e1ea84d03c6a (patch)
treea93d812d87cae84f1a6a927f14e8d224284da475 /Lib/enum.py
parentac12a6bf34e8fb55958f027444f58016aa9600ea (diff)
downloadcpython-582aadc80e566fe8ab9b15d4d221e1ea84d03c6a.zip
cpython-582aadc80e566fe8ab9b15d4d221e1ea84d03c6a.tar.gz
cpython-582aadc80e566fe8ab9b15d4d221e1ea84d03c6a.tar.bz2
[3.11] gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104809)
[3.12] gh-104271: Fix auto() fallback in case of mixed type Enum (GH-104279) (cherry picked from commit f4e2049f14d40c1b893c68530eec5e341cf3d929) Co-authored-by: Itamar Ostricher <itamarost@gmail.com>
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 26e5c50..45e3cd0 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -1170,7 +1170,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: