-
-
Notifications
You must be signed in to change notification settings - Fork 581
Open
Description
Feature Request Type
- Core functionality
- Alteration (enhancement/optimization) of existing feature(s)
- New behavior
Description
Since python 3.11 , enum module provide StrEnum
which use value instead of key:
class Direction(StrEnum):
NORTH = 'north'
SOUTH = 'south'
print(Direction.NORTH)
>>> north
And is supported by pydantic.
This allow user use value not suitable for variable name as enum, for example, "01ab"
.
heckad
Metadata
Metadata
Assignees
Labels
No labels