[Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

R. David Murray rdmurray at bitdance.com
Mon Feb 25 16:35:25 CET 2013

On Mon, 25 Feb 2013 07:12:03 -0800, Ethan Furman <ethan at stoneleaf.us> 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

I believe they are taking the second definition.  Which would mean that,
at a minimum, if it is called an Enum the components should be orderable
according to the order of definition.  Also having an integer value
would decrease the surprise factor.

Either that, or name them something other than "enum".

If they aren't ints and they aren't orderable, it seems to me they are
just a set of names.  Which if we had labeled values, could be implemented
as...a set of names.


More information about the Python-Dev mailing list