mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
issue26893: use mro() to examine class heirarchy
This commit is contained in:
commit
354706915c
2 changed files with 14 additions and 1 deletions
|
@ -124,7 +124,7 @@ class EnumMeta(type):
|
|||
|
||||
# save attributes from super classes so we know if we can take
|
||||
# the shortcut of storing members in the class dict
|
||||
base_attributes = {a for b in bases for a in b.__dict__}
|
||||
base_attributes = {a for b in enum_class.mro() for a in b.__dict__}
|
||||
|
||||
# Reverse value->name map for hashable values.
|
||||
enum_class._value2member_map_ = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue