Say I have such a python Enum
class:
from enum import Enum
class Mood(Enum):
red = 0
green = 1
blue = 2
Is there a natural way to get the total number of items in Mood
? (like without having to iterate over it, or to add an extra n
item, or an extra n
classproperty
, etc.)
Does the enum
module provide such a functionality?