enum in Python
Sean Ross
sross at connectmail.carleton.ca
Mon Sep 8 18:12:30 EDT 2003
"Andrew Chalk" <achalk at XXXmagnacartasoftware.com> wrote in message
news:KF67b.33$fd2.25 at newssvr23.news.prodigy.com...
> What is the best way to implement an equivalent of C's 'enum' type in
> Python?
>
> As a rank Python beginner I've used a dictionary, but presumably there is
a
> better way.
>
> Thanks
>
>
Hi.
This c.l.py thread may be helpful:
http://mail.python.org/pipermail/python-list/2003-February/149342.html
as may this cookbook recipe:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/67107
More information about the Python-list
mailing list