This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ethan.furman
Recipients John Hagen, barry, eli.bendersky, ethan.furman
Date 2016-05-10.01:58:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1462845494.53.0.997778763537.issue26988@psf.upfronthosting.co.za>
In-reply-to
Content
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.).
History
Date User Action Args
2016-05-10 01:58:14ethan.furmansetrecipients: + ethan.furman, barry, eli.bendersky, John Hagen
2016-05-10 01:58:14ethan.furmansetmessageid: <1462845494.53.0.997778763537.issue26988@psf.upfronthosting.co.za>
2016-05-10 01:58:14ethan.furmanlinkissue26988 messages
2016-05-10 01:58:14ethan.furmancreate