Message189067
On May 12, 2013, at 10:57 AM, Nick Coghlan wrote:
>I encountered an interesting suggestion [1] regarding the enum.Enum
>convenience API: use the member names as their values, rather than the
>current integers starting from one.
>
>Since we're now using definition order rather than value order for iteration,
>this suggestion makes a lot of sense to me.
Cute, but I want the functional API to be equivalent to the class syntax.
Besides:
X = Enum('X', ((name, name) for name in 'ant bee cat dog elk'.split()))
is not so much typing. |
|
Date |
User |
Action |
Args |
2013-05-12 22:00:29 | barry | set | recipients:
+ barry, ncoghlan, ethan.furman |
2013-05-12 22:00:29 | barry | link | issue17961 messages |
2013-05-12 22:00:29 | barry | create | |
|