Tricks to do "enums"?
Courageous
jkraska1 at san.rr.com
Sun May 7 21:27:50 EDT 2000
More information about the Python-list mailing list
Sun May 7 21:27:50 EDT 2000
- Previous message (by thread): Strange error message when calling random in Py1.5
- Next message (by thread): Tricks to do "enums"?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
So, I've been doing module level enums like this: ## My module VAL1=0 VAL2=1 VAL3=3 While this works, and gives me great namespace protection (individuals using my "enum" prefix it with the module name), I'm wondering if there's any trick that will produce these without requiring me to renumber them? I'm getting tired of typing in new numbers for them if I decide to reorder them or insert elements... C/
- Previous message (by thread): Strange error message when calling random in Py1.5
- Next message (by thread): Tricks to do "enums"?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list