Message275374
With the landing of ordered class namespaces the build order for Enum needs to be redone to at least keep the user-specified pieces' relative order intact:
>>> from enum import Enum
>>> class Color(Enum):
... red = 1
... blue = 2
... green = 3
... def primary(self):
... return True
...
>>> Color.__dict__.keys()
dict_keys(['_generate_next_value_', '__module__', 'primary', '__doc__', '_member_names_', '_member_map_', '_member_type_', '_value2member_map_', 'red', 'blue', 'green', '__new__']) |
|
Date |
User |
Action |
Args |
2016-09-09 18:26:38 | ethan.furman | set | recipients:
+ ethan.furman, barry, eli.bendersky |
2016-09-09 18:26:38 | ethan.furman | set | messageid: <1473445598.15.0.0178037460772.issue28048@psf.upfronthosting.co.za> |
2016-09-09 18:26:38 | ethan.furman | link | issue28048 messages |
2016-09-09 18:26:38 | ethan.furman | create | |
|