Ethan Furman added the comment:
On the other hand, if you use aenum you can do:
class Color(AutoNumber):
red
green
blue
And isn't that better*? ;)
* For those in danger of swallowing their tongue over the magic involved: The
magic is turned off as soon as any descriptor is defined (property, function,
etc.).
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue26988>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com