summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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]