Enums in Python?
Will Ware
wware at world.std.com
Mon Aug 14 10:47:31 EDT 2000
Fernando (frr at mindless.com) wrote:
> Can you have enums in Python? O:-)
ALPHA, BRAVO, CHARLIE, DELTA, ECHO = range(5)
This assigns unique values to each variable. They are variables, not
constants, so it's your job to remember not to reassign them.
--
# - - - - - - - - - - - - - - - - - - - - - - - -
# Resistance is futile. Capacitance is efficacious.
# Will Ware email: wware @ world.std.com
More information about the Python-list
mailing list