summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-09-17 00:28:32 (GMT)
committerGitHub <noreply@github.com>2020-09-17 00:28:32 (GMT)
commit007eddad3b809e1555391dc7e8168918933b6184 (patch)
treeb2125194e5c981cec0d568fbe1317e8c88f05050 /Lib/enum.py
parent3f4012117bf80aa7c005f8fa6fb8e1f8b1aef5d5 (diff)
downloadcpython-007eddad3b809e1555391dc7e8168918933b6184.zip
cpython-007eddad3b809e1555391dc7e8168918933b6184.tar.gz
cpython-007eddad3b809e1555391dc7e8168918933b6184.tar.bz2
_auto_called cleanup (GH-22285)
(cherry picked from commit fc23a9483ef0d7c98bea9f82392377d0b6ef7b18) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
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 4c1acc6..c2adfd1 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -104,9 +104,9 @@ class _EnumDict(dict):
# enum overwriting a descriptor?
raise TypeError('%r already defined as: %r' % (key, self[key]))
if isinstance(value, auto):
- self._auto_called = True
if value.value == _auto_null:
value.value = self._generate_next_value(key, 1, len(self._member_names), self._last_values[:])
+ self._auto_called = True
value = value.value
self._member_names.append(key)
self._last_values.append(value)