Message273127
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! |
|
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 | |
|