[Python-Dev] constant/enum type in stdlib

Glyph Lefkowitz glyph at twistedmatrix.com
Tue Nov 23 22:10:00 CET 2010


On Nov 23, 2010, at 10:01 AM, Antoine Pitrou wrote:

> Well, it is easy to assign range(N) to a tuple of names when desired. I
> don't think an automatically-enumerating constant generator is needed.

I don't think that numerical enumerations are the only kind of constants we're talking about.  Others have already mentioned strings.  Also, see <http://tm.tl/4671> for some other use-cases.  Since this isn't coming to 2.x, we're probably going to do our own thing anyway (unless it turns out that flufl.enum is so great that we want to add another dependency...) but I'm hoping that the outcome of this discussion will point to something we can be compatible with.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20101123/f58d7403/attachment.html>


More information about the Python-Dev mailing list