
On 29 January 2013 14:00, Eli Bendersky <eliben@gmail.com> wrote:
On Tue, Jan 29, 2013 at 3:50 AM, Nick Coghlan <ncoghlan@gmail.com> wrote:
On Tue, Jan 29, 2013 at 11:50 AM, Joao S. O. Bueno <jsbueno@python.org.br> wrote:
This idea is not new - but it is stalled - Last I remember it came around in Python-devel in 2010, in this thread:
http://mail.python.org/pipermail/python-dev/2010-November/thread.html#105967
FWIW, since that last discussion, I've switched to using strings for my special constants, dumping them in a container if I need some kind of easy validity checking or iteration.
That said, an enum type may still be useful for interoperability with other systems (databases, C APIs, etc).
I really wish there would be an enum type in Python that would make sense. ISTM this has been raised numerous times, but not one submitted a good-enough proposal.
As I pointed above, this last discussion was coming to a good term. Bad timing and no one clearly saying, with all the words "Michael Foord, please make this into a PEP" made it fade away, I think. js -><-
Eli