Closed
Description
As mentioned in #101273 , when mixing data types into an enum, the data type's methods can be lost:
from enum import StrEnum, auto
class Book(StrEnum):
author = auto()
title = auto()
isbn = auto()
Book.author
# <Book.author: 'author'>
Book.author.title()
# book object not callable exception, but 'Author' is expected
Linked PRs
Metadata
Metadata
Assignees
Labels
only security fixesonly security fixesonly security fixesonly security fixesonly security fixesonly security fixesend of lifeend of lifeend of lifeend of lifeonly security fixesonly security fixesPython modules in the Lib dirPython modules in the Lib dirAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error