mirror of
https://github.com/python/cpython.git
synced 2025-10-08 08:01:55 +00:00
_auto_called cleanup (GH-22285)
This commit is contained in:
parent
a5634c4067
commit
fc23a9483e
2 changed files with 12 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue