Change by Alexander Marshalov <_...@marshalov.org>:
--
title: Small improvements in heapq (refatoring) -> Small improvements in heapq
(refactoring)
___
Python tracker
<https://bugs.python.or
Change by Alexander Marshalov <_...@marshalov.org>:
--
keywords: +patch
pull_requests: +7965
stage: -> patch review
___
Python tracker
<https://bugs.python.or
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
Change by Alexander Marshalov <_...@marshalov.org>:
--
keywords: +patch
pull_requests: +7864
stage: -> patch review
___
Python tracker
<https://bugs.python.or
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)
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 expre
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)