On 02/25/2013 03:22 PM, Greg Ewing wrote:
Ethan Furman wrote:
I must admit I find it mildly amusing (but a lot frustrating) that we are talk
about /enumerations/ not needing to be
based on ints. Checking out Merrian-Webster gives this:
Definition of ENUMERATE
1
: to ascertain the number of : count
2
: to specify one after another : list
It depends on what you mean by "based on ints". Pascal
enums are using the second definition here: the values
have ints associated with them, but are not themselves
ints.
There are really two different use cases. Sometimes you
want to have values that are directly substitutable for ints;
other times you would rather not, so as to catch mistakes
more easily.
I agree. I think whichever enum ends up in the stdlib should support both
types (and possibly a couple other variations).
--
~Ethan~
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com