I was playing around with python enums and noticed this behavior. So, I create an enum class as follows;
from enum import Enum
class T(Enum):
A = 1,
B = 2,
C = 3
Now, I do:
s = T.A
print(s.value)
This prints (1,)
. Also, type(s.value)
is a tuple
. This is a bit strange to me. Why is it wrapping the enum values as tuples?