[issue35585] Speedup Enum lookup

2018-12-26 Thread Andrew Svetlov
Change by Andrew Svetlov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue35585] Speedup Enum lookup

2018-12-26 Thread Andrew Svetlov
Andrew Svetlov added the comment: New changeset 705b5998035739b1794a862123d3dc6e339a14d0 by Andrew Svetlov (Miss Islington (bot)) in branch '3.7': Speed-up building enums by value, e.g. http.HTTPStatus(200) (GH-11318) (GH-11324) https://github.com/python/cpython/commit/705b5998035739b1794a86

[issue35585] Speedup Enum lookup

2018-12-26 Thread miss-islington
Change by miss-islington : -- pull_requests: +10587 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35585] Speedup Enum lookup

2018-12-26 Thread Ethan Furman
Ethan Furman added the comment: New changeset 34ae04f74dcf4ac97d07c3e82eaf8f619d80cedb by Ethan Furman (Andrew Svetlov) in branch 'master': Speed-up building enums by value, e.g. http.HTTPStatus(200) (#11318) https://github.com/python/cpython/commit/34ae04f74dcf4ac97d07c3e82eaf8f619d80cedb

[issue35585] Speedup Enum lookup

2018-12-25 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> ethan.furman nosy: +ethan.furman ___ Python tracker ___ ___ Python-bugs-list mailing

[issue35585] Speedup Enum lookup

2018-12-25 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +10568 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-

[issue35585] Speedup Enum lookup

2018-12-25 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch, patch pull_requests: +10568, 10569 stage: -> patch review ___ Python tracker ___ __

[issue35585] Speedup Enum lookup

2018-12-25 Thread Andrew Svetlov
New submission from Andrew Svetlov : 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 KeyErro