Enums in Python?

Aahz Maruch aahz at netcom.com
Mon Aug 14 11:36:01 EDT 2000


In article <b9Tl5.119$8b1.2383 at m2newsread.uni2.es>,
Fernando <frr at mindless.com> wrote:
>
>    Can you have enums in Python? O:-)

There are no "enums" in Python (in the C sense of the word), but there
are lots of ways to create enum-like features in Python; which one is
best for your purposes depends on what you're using the enums for.  If
you give us more details, we can probably give you a better answer.
--
                      --- Aahz (Copyright 2000 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Gun-toting Naderite / socialized medicine libertarian



More information about the Python-list mailing list