c enum - how to do this in python?

Rene Pijlman reageer.in at de.nieuwsgroep
Fri Feb 21 16:48:01 EST 2003


Klaus Meyer:
>C has enum to define named constant like:
>enum { M0, M1, M2, MCOUNT };
>(MCOUNT gives the number of constants, nice for loops or so)
>
>How to do this in Python?

http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/67107

-- 
René Pijlman

Wat wil jij leren?  http://www.leren.nl




More information about the Python-list mailing list