[Python-ideas] constant/enum type in stdlib (original) (raw)

Barry Warsaw barry at python.org
Wed Jan 30 02:27:30 CET 2013


On Jan 28, 2013, at 11:50 PM, Joao S. O. Bueno wrote:

And it was not dismissed at all - to the contrary the last e-mail in the thread is a message from the BDLF for it to be ! The discussion happened in a bad moment as Python was mostly freature froozen for 3.2 - and it did not show up again for Python 3.3;

I still offer up my own enum implementation, which I've used and has been available for years on PyPI, and hasn't had a new release in months because it hasn't needed one. :) It should be compatible with Pythons from 2.6 to 3.3.

http://pypi.python.org/pypi/flufl.enum

The one hang up about it the last time this came up was that my enum items are not ints and Guido though they should be. I actually tried at one point to make that so, but had some troublesome test failures that I didn't have time or motivation to fix, mostly because I don't particularly like those semantics. I don't remember the details.

However, if someone else wanted to submit a branch/patch to have enum items inherit from ints, and that was all it took to have these adopted into the stdlib, I would be happy to take a look.

Cheers, -Barry -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130129/9b552107/attachment.pgp>



More information about the Python-ideas mailing list