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 barry
Recipients David Hagen, John Hagen, abarry, barry, eli.bendersky, ethan.furman, kennethreitz, python-dev, rhettinger, veky, vstinner
Date 2016-08-19.14:45:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20160819104513.58dd23d9@subdivisions.wooz.org>
In-reply-to <1471617253.23.0.460552470856.issue26988@psf.upfronthosting.co.za>
Content
Hey, I just realized that you can get pretty darn close with just a little bit
of extra typing, and existing stdlib:

    from enum import Enum
    from itertools import count

    auto = count()

    class Color(Enum):
        red = next(auto)
        green = next(auto)
        blue = next(auto)

Look ma, no magic!
History
Date User Action Args
2016-08-19 14:45:17barrysetrecipients: + barry, rhettinger, vstinner, eli.bendersky, ethan.furman, python-dev, veky, abarry, John Hagen, David Hagen, kennethreitz
2016-08-19 14:45:17barrylinkissue26988 messages
2016-08-19 14:45:17barrycreate