Message273127
| 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:17 | barry | set | recipients:
+ barry, rhettinger, vstinner, eli.bendersky, ethan.furman, python-dev, veky, abarry, John Hagen, David Hagen, kennethreitz |
| 2016年08月19日 14:45:17 | barry | link | issue26988 messages |
| 2016年08月19日 14:45:17 | barry | create |
|