Enums and Python

Trent Mick trentm at activestate.com
Tue Jun 20 21:47:23 EDT 2000


On Wed, Jun 21, 2000 at 12:56:16AM +0000, William Dandreta wrote:
> Is there a Python type like the C enum type?
> 
> It can be very useful in making code more readable.
> 

Nothing specific but you can fake iti (sort of):

(elem0, elem1, elem2, elem3) = range(4)


Trent

-- 
Trent Mick
trentm at activestate.com




More information about the Python-list mailing list