Allow for enum docstrings
A friend showed me a different enum package with support for enum item docstrings. The syntax was something like:
from flufl.enum import Enum
class Color(Enum):
red = (1, 'The color red')
blue = (2, 'The color blue')
green = (3, 'The color green')
i.e. assignment of a tuple where the first element is the value and the second is the docstring.
While this is a neat idea, I think the syntax conflicts with existing semantics where tuple values are perfectly valid. Perhaps something like the following could work though:
from flufl.enum import Enum, Value
class Color(Enum):
red = Value(1, 'The color red')
blue = Value(2, 'The color blue')
green = Value(3, 'The color green')