summaryrefslogtreecommitdiffstats
path: root/Lib/heapq.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-08-03 19:20:16 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-08-03 19:20:16 (GMT)
commit6681de2455f8d43de9cb22ddaf6a155c63af81c3 (patch)
tree673fa95bd2bb4149ffbb852973e0ee3a1a987943 /Lib/heapq.py
parent0ad679ff0f014c3c29fb839f33c027d7d928a09a (diff)
downloadcpython-6681de2455f8d43de9cb22ddaf6a155c63af81c3.zip
cpython-6681de2455f8d43de9cb22ddaf6a155c63af81c3.tar.gz
cpython-6681de2455f8d43de9cb22ddaf6a155c63af81c3.tar.bz2
_siftup(): __le__ is now the only comparison operator used on array
elements.
Diffstat (limited to 'Lib/heapq.py')
-rw-r--r--Lib/heapq.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/heapq.py b/Lib/heapq.py
index 23f8be5..47326f3 100644
--- a/Lib/heapq.py
+++ b/Lib/heapq.py
@@ -233,7 +233,7 @@ def _siftup(heap, pos):
while childpos < endpos:
# Set childpos to index of smaller child.
rightpos = childpos + 1
- if rightpos < endpos and heap[rightpos] < heap[childpos]:
+ if rightpos < endpos and heap[rightpos] <= heap[childpos]:
childpos = rightpos
# Move the smaller child up.
heap[pos] = heap[childpos]