-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
Labels
enumsruntime semanticsAccurate modeling of how Python's semantics work at runtimeAccurate modeling of how Python's semantics work at runtime
Milestone
Description
Doc: https://docs.python.org/3/library/enum.html
Typing spec: https://typing.python.org/en/latest/spec/enums.html
Base features:
- Differentiating members from non-members
- Create a new type variant for enum literals
- Enum literal expansion
- Write a micro benchmark with large enums
- Enforce implicit
@finalfor Enum classes (with members) - Support iteration over enums
- Detect enums in all cases (metaclass derives from
EnumMeta/EnumType)
Advanced features:
- Infer type for member names and member values.
- Handling of
enum.Flag(enum expansion may not be performed for subclasses ofenum.Flag) - Special-case handling of
IntEnum,StrEnum, or other custom classes that derive from bothEnumand some other class (infer appropriate types for member values) - Custom
__new__or__init__methods in enums. -
auto()values - Support for generate_next_value
- Special-case handling for call to enum class to retrieve member by value (e.g. Color(“red”))
- Function syntax to create Enums
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enumsruntime semanticsAccurate modeling of how Python's semantics work at runtimeAccurate modeling of how Python's semantics work at runtime