I have following enum defined
from enum import Enum
class D(Enum):
x = 1
y = 2
print(D.x)
now the printed value is
D.x
instead I wanted the enum's value to be print
1
Hhat can be done to achieve this functionality?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…