PEP 354: Enumerations in Python
Tim Chase
python.list at tim.thechases.com
Mon Feb 27 03:15:39 EST 2006
>>Why are empty enumerations not allowed? Empty sets, empty lists,
>>empty dictionaries are all allowed. I don't see any obvious benefits
>>to not allowing empty enumerations.
>
> What is an empty enum? How and when would you use it?
It's a Zen thing :) (agh! not the zen thread!)
>>> roundSquares = enum()
>>> soundsMadeByOneHandClapping = enum()
>>> def nirvana(emptyness):
... if emptyness != enum():
... throw UnthrowableKoan
...
(okay...maybe it's a little too early on a weekdays.mon morning)
-tkc
More information about the Python-list
mailing list