Re:PEP 435 Accepted – Adding an Enum type to the Python stan...
by bsimpson on Friday May 10, 2013 @06:12PM
(#5688966)
I understand that, but I'm not sure it matter. Is it worth the ugliness in the API to print out the class name when you run print? Is 'api' that much worse than "ImportMethod.API"?
[ Parent
| on HN ]
Re:PEP 435 Accepted – Adding an Enum type to the Python stan...
by dietrichepp on Saturday May 11, 2013 @01:44AM
(#5689808)
That's not all it's there for. Python programmers expect to be able to do things like print(obj.__class__.__name__). You're definitely free to write your own alternative Enum, however, since it's just a library function.