c enum - how to do this in python?

Jp Calderone exarkun at intarweb.us
Fri Feb 21 17:24:50 EST 2003


On Fri, Feb 21, 2003 at 11:01:43PM +0100, Klaus Meyer wrote:
> Hi Rene,
> 
> >>enum { M0, M1, M2, MCOUNT };
> >>How to do this in Python?
> >
> >http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/67107
> 
> Thanks, but surprisingly complex in Python...
> 

  That's the implementation for "enums" in Python.  Go find the
implementation for enums in your C compiler, and see how complex it is ;)

  Jp

-- 
There are 10 kinds of people: those who understand binary and those who do
not.
-- 
 up 13 days, 2:28, 5 users, load average: 0.00, 0.10, 0.23
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20030221/4b2b8eb6/attachment.sig>


More information about the Python-list mailing list