diff options
author | Ethan Furman <ethan@stoneleaf.us> | 2020-09-16 12:37:54 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-16 12:37:54 -0700 |
commit | fc23a9483ef0d7c98bea9f82392377d0b6ef7b18 (patch) | |
tree | fb5c21a985ebddae10298469658fe037aceaa86e /Lib/enum.py | |
parent | bpo-41746: Add type information to asdl_seq objects (GH-22223) (diff) | |
download | cpython-fc23a9483ef0d7c98bea9f82392377d0b6ef7b18.tar.gz cpython-fc23a9483ef0d7c98bea9f82392377d0b6ef7b18.tar.bz2 cpython-fc23a9483ef0d7c98bea9f82392377d0b6ef7b18.zip |
_auto_called cleanup (GH-22285)
Diffstat (limited to 'Lib/enum.py')
-rw-r--r-- | Lib/enum.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/enum.py b/Lib/enum.py index 060b2a0dadf..21a94caaee3 100644 --- a/Lib/enum.py +++ b/Lib/enum.py @@ -105,9 +105,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) |