Skip to content

Commit e5bbe82

Browse files
committed
Fix enum.py for RustPython
1 parent 39c7392 commit e5bbe82

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/enum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def __new__(metacls, cls, bases, classdict):
157157

158158
# save attributes from super classes so we know if we can take
159159
# the shortcut of storing members in the class dict
160-
base_attributes = {a for b in enum_class.mro() for a in b.__dict__}
160+
base_attributes = {a for b in enum_class.mro() for a in dir(b)} # XXX modified for rustpython
161161

162162
# Reverse value->name map for hashable values.
163163
enum_class._value2member_map_ = {}

0 commit comments

Comments
 (0)