summaryrefslogtreecommitdiffstats
path: root/Lib/enum.py
diff options
context:
space:
mode:
authorEthan Furman <ethan@stoneleaf.us>2018-10-06 06:29:36 (GMT)
committerGitHub <noreply@github.com>2018-10-06 06:29:36 (GMT)
commitcd45385ffad8910293e5659cfe7ab036e70613b7 (patch)
tree844790c5a632c9791f744110106765476516df71 /Lib/enum.py
parent92878829c31ab2fc71c60555ce87a5f6cbc876f0 (diff)
downloadcpython-cd45385ffad8910293e5659cfe7ab036e70613b7.zip
cpython-cd45385ffad8910293e5659cfe7ab036e70613b7.tar.gz
cpython-cd45385ffad8910293e5659cfe7ab036e70613b7.tar.bz2
bpo-34909: keep searching mixins until base class is found (GH-9737)
Diffstat (limited to 'Lib/enum.py')
-rw-r--r--Lib/enum.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/enum.py b/Lib/enum.py
index 0ccb30d..fec1aed 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -486,7 +486,7 @@ class EnumMeta(type):
if base is object:
continue
elif '__new__' in base.__dict__:
- if issubclass(base, Enum) and not hasattr(base, '__new_member__'):
+ if issubclass(base, Enum):
continue
return base
@@ -499,7 +499,6 @@ class EnumMeta(type):
member_type = _find_data_type(bases) or object
if first_enum._member_names_:
raise TypeError("Cannot extend enumerations")
-
return member_type, first_enum
@staticmethod
@@ -545,7 +544,6 @@ class EnumMeta(type):
use_args = False
else:
use_args = True
-
return __new__, save_new, use_args