From 6681de2455f8d43de9cb22ddaf6a155c63af81c3 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sat, 3 Aug 2002 19:20:16 +0000 Subject: _siftup(): __le__ is now the only comparison operator used on array elements. --- Lib/heapq.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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] -- cgit v0.12