[Tutor] Python Version of "enum" ?
John.Gooch at echostar.com
Thu Oct 21 22:47:12 CEST 2004
Is there an equivalent of C++'s 'enum' keyword to set a number of named
constants ( like so )
in Python? It makes reading the code a lot simpler, as opposed to having to
look up what a status of "1" means, it can be replaced with "ON", which is
much easier to understand.
If not, can you declare named constants another way? Perhaps 'const MONDAY =
1', for example.
John A. Gooch
IT - Tools
EchoStar Satellite L.L.C.
9601 S. Meridian Blvd.
Englewood, CO 80112
More information about the Tutor