I would like to add a lookup list in Enum as a static variable. The best I could do is
class Seed(IntEnum):
HEARTS = 0
DIAMONDS = 1
SPADES = 2
CLUBS = 3
@staticmethod
def value_list():
Seed.list = [s.value for s in Seed]
and then in the code I have to do
Seed.value_list()
to initialize the variable list which in this way is not static but is the same for all the instances. Then I can use
Seed.list
Is there a way to do this?