[Python-Dev] PEP 435: initial values must be specified? Yes
Georg Brandl
g.brandl at gmx.net
Mon May 6 19:48:32 CEST 2013
More information about the Python-Dev mailing list
Mon May 6 19:48:32 CEST 2013
- Previous message: [Python-Dev] PEP 435: initial values must be specified? Yes
- Next message: [Python-Dev] PEP 435: initial values must be specified? Yes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Am 05.05.2013 22:09, schrieb Ethan Furman: > About the closest you going to be able to get is something like: > > def e(_next=[1]): > e, _next[0] = _next[0], _next[0] + 1 > return e > > class Color(Enum): > red = e() > green = e() > blue = e() Uh, that's surely more nicely spelled as "e = itertools.count()"? Georg
- Previous message: [Python-Dev] PEP 435: initial values must be specified? Yes
- Next message: [Python-Dev] PEP 435: initial values must be specified? Yes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list