12 Feb
2013
12 Feb
'13
11:50 a.m.
On Feb 12, 2013, at 04:05 PM, Joao S. O. Bueno wrote:
That is too much ' ' typing - I think it would be ok, to have it like that, but a helper function that would work just like the namedtuple call: Color = Enum("Color", "RED GREEN BLUE", int)
How about:
>>> from flufl.enum import make
>>> make('Colors', 'RED GREEN BLUE'.split())