You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the idea of a mixin class to an Enum is to make the members behave like instances of the mixin class, I think it's reasonable to expect that attribute resolution of a member whose value is an instance of a subclass of the mixin class follows MRO as well. Currently the attribute resolution appears to stick to the base mixin class.
Minimal reproducible example:
fromenumimportEnumclassBase:
name='base'classChild(Base):
name='child'classBaseEnum(Base, Enum):
FOO=Child()
print(BaseEnum.FOO.name) # outputs 'base' when 'child' is expectedprint(BaseEnum.FOO.value.name) # outputs 'child' as expected