3 ms·
The PEP mentions these explicit values allow the creation of aliases in a very natural way. class Keys(Enum): space = 1 esc = 2 enter = 3
by BoppreH 13y ago
The PEP mentions these explicit values allow the creation of aliases in a very natural way.
class Keys(Enum):
space = 1
esc = 2
enter = 3
return = 3 # Alias to "enter".
Also, less magic.
- IgorPartola 13y agoreturn = 3 shouldn't work.
- mbreese 13y agoyou know what they meant...