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
{{ message }}
Repository navigation
[Enum] attributes of mixed-in classes can be shadowed by other members #103596
As mentioned in #101273 , when mixing data types into an enum, the data type's methods can be lost:
fromenumimportStrEnum, autoclassBook(StrEnum):
author=auto()
title=auto()
isbn=auto()
Book.author# <Book.author: 'author'>Book.author.title()
# book object not callable exception, but 'Author' is expected
Activity
ethanfurman commentedon Apr 17, 2023
This is a long-standing issue, so not going to backport any fix.
gh-103596: [Enum] do not shadow mixed-in methods/attributes (GH-103600)
Merge branch 'main' into superopt