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 …
Possible Duplicate:
How can I represent an 'enum' in Python?
What's the common practice for enums in Python? I.e. how are they replicated in Python?
public enum Materials
{
Shaded,
Shiny,
Transparent,
Matte
}