Python enum module support enumeration related functionality.
What is enum?
Enum is a set of symbolic names (members) bound to unique, constant values.
Can I iterate over enumeration?
Yes
In this tutorial series, you are going to learn.
- Python: enum: hello world
- Python: Print all the members of enum
- Python: What is the type of enumeration member
- Python: Get enum member name
- Python: get enum member value
- Python: Use enum members as dictionary keys
- Python: access the enum members
- Python: Ensure unique enum values
- Python: Generate auto values to the enum members
- Python: enum: aliases
- Python: __members__: Get all enum members including aliases
- Python: Compare two enum members for equality
- Python: Add methods to the enum
- Python: How inheritance work with enum?
- Python: Define Enum using functional api
- Python: IntEnum: behave like integer
- Python: IntFlag enum
No comments:
Post a Comment