[Python-ideas] constant/enum type in stdlib (original) (raw)
Joao S. O. Bueno jsbueno at python.org.br
Tue Jan 29 17:09:20 CET 2013
- Previous message: [Python-ideas] constant/enum type in stdlib
- Next message: [Python-ideas] constant/enum type in stdlib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 29 January 2013 14:00, Eli Bendersky <eliben at gmail.com> wrote:
On Tue, Jan 29, 2013 at 3:50 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
On Tue, Jan 29, 2013 at 11:50 AM, Joao S. O. Bueno <jsbueno at 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
- Previous message: [Python-ideas] constant/enum type in stdlib
- Next message: [Python-ideas] constant/enum type in stdlib
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]