Message332524
Construction enums by-value (e.g. http.HTTPStatus(200)) performs two dict lookups:
if value in cls._value2member_map_:
return cls._value2member_map_[value]
Changing the code to just
return cls._value2member_map_[value]
with catching KeyError can speedup the fast path a little. |
|
Date |
User |
Action |
Args |
2018-12-26 00:26:27 | asvetlov | set | recipients:
+ asvetlov |
2018-12-26 00:26:24 | asvetlov | set | messageid: <1545783984.81.0.712150888896.issue35585@roundup.psfhosted.org> |
2018-12-26 00:26:24 | asvetlov | link | issue35585 messages |
2018-12-26 00:26:24 | asvetlov | create | |
|