[issue34210] Small improvements in heapq (refactoring)

2018-07-24 Thread Alexander Marshalov
Change by Alexander Marshalov <_...@marshalov.org>: -- title: Small improvements in heapq (refatoring) -> Small improvements in heapq (refactoring) ___ Python tracker <https://bugs.python.or

[issue34210] Small improvements in heapq (refatoring)

2018-07-24 Thread Alexander Marshalov
Change by Alexander Marshalov <_...@marshalov.org>: -- keywords: +patch pull_requests: +7965 stage: -> patch review ___ Python tracker <https://bugs.python.or

[issue34210] Small improvements in heapq (refatoring)

2018-07-24 Thread Alexander Marshalov
New submission from Alexander Marshalov <_...@marshalov.org>: I would like to make three small improvements to the "heapq" module. 1) The "nsmallest" function has the following code (a similar code exists in the "nlargest" function): # When n>=si

[issue34149] Behavior of the min/max with key=None

2018-07-18 Thread Alexander Marshalov
Change by Alexander Marshalov <_...@marshalov.org>: -- keywords: +patch pull_requests: +7864 stage: -> patch review ___ Python tracker <https://bugs.python.or

[issue34149] Behavior of the min/max with key=None

2018-07-18 Thread Alexander Marshalov
New submission from Alexander Marshalov <_...@marshalov.org>: I was faced with the fact that the behavior of the functions "min"/"max" and "sorted" is a little different. For example, this code works fine: >>> sorted([3, 2, 1], key=None)

[issue26722] Fold compare operators on constants (peephole)

2016-04-09 Thread Alexander Marshalov
Alexander Marshalov added the comment: Hi all, this is my first patch to Python. I'm interested in the performance of python code, I even worked on the development of the static optimizer based on modifications of the AST. I had a few ideas for improving peepholer (for example, the expression

[issue26722] Fold compare operators on constants (peephole)

2016-04-09 Thread Alexander Marshalov
New submission from Alexander Marshalov: Missed peephole optimization: 1 > 2 -> False 3 < 4 -> True 5 == 6 -> False 6 != 7 -> True 7 >= 8 -> False 8 <= 9 -> True 10 is 11 -> False 12 is not 13 -> True 14 in (15, 16, 17)