[Python-ideas] PEP XXX - Competitor with PEP 435: Adding an enum type to the Python standard library
Stephen J. Turnbull
stephen at xemacs.org
Tue Mar 12 01:20:17 CET 2013
Paul Moore writes:
> Yes, it is - thanks. I missed the significance of "Sequence" in the
> PEP
Overall the PEP's presentation suffers severely from class-instance
confusion. In the *enumeration* Color(red, green, blue), Color.red is
not an "enumeration", it is an *enumerator* (or element or member).
Ditto for all the concrete class names. I'm not sure this really
matters (I'm the kind of pedant who is enraged by the use of "it's" as
a possessive), but it bugs me.<wink/>
In the case of "Sequence", I would assume that the actual behavior is
equivalent to range() with names. Based on past discussion of Ethan's
use case, I suppose that that's not quite accurate. Rather, I expect
that Sequence actually addresses the question of using an enumerator
as an index to a Python sequence (list, etc.)
More information about the Python-ideas
mailing list