Message265215
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.). |
|
Date |
User |
Action |
Args |
2016-05-10 01:58:14 | ethan.furman | set | recipients:
+ ethan.furman, barry, eli.bendersky, John Hagen |
2016-05-10 01:58:14 | ethan.furman | set | messageid: <1462845494.53.0.997778763537.issue26988@psf.upfronthosting.co.za> |
2016-05-10 01:58:14 | ethan.furman | link | issue26988 messages |
2016-05-10 01:58:14 | ethan.furman | create | |
|