-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Open
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
from enum import Enum, StrEnum, auto
class Foo(Enum):
one = auto()
two = auto()
class Bar(StrEnum):
one = auto()
two = auto()
names = ["one", "two"]
print([Foo[name] for name in names])
print(list(map(Foo.__getitem__, names)))
print([Bar[name] for name in names])
print(list(map(Bar.__getitem__, names))) # TypeError: expected 1 argument, got 0
CPython versions tested on:
3.12, 3.13
Operating systems tested on:
macOS
Metadata
Metadata
Assignees
Labels
stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error