equivalent of enum?

Greg Ewing greg.ewing at compaq.com
Sun Sep 12 22:16:28 EDT 1999


Doug Hellmann wrote:
> 
>         one, two, three = range(3)
> 
>         print one, two, three

If I'm not overly concerned about speed, often I just
use string values as enums. This has the advantage that
they print out as meaningful names when debugging.

Greg




More information about the Python-list mailing list