Python minimales Enum (enum.Enum) Beispiel
python-minimal-enum-enum-enum-example.py
from enum import Enum
class Shape(Enum):
Circle = 0
Square = 1
Hexagon = 2
# Usage example
print(Shape.Square) # prints Shape.SquareBasierend auf der offiziellen enum-Paketdokumentation.
Check out similar posts by category:
Python
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow