[Python-checkins] python/dist/src/Lib heapq.py,1.11,1.12
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Sat, 03 Aug 2002 12:20:19 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv18759/python/Lib
Modified Files:
heapq.py
Log Message:
_siftup(): __le__ is now the only comparison operator used on array
elements.
Index: heapq.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/heapq.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** heapq.py 3 Aug 2002 10:10:10 -0000 1.11
--- heapq.py 3 Aug 2002 19:20:16 -0000 1.12
***************
*** 234,238 ****
# Set childpos to index of smaller child.
rightpos = childpos + 1
! if rightpos < endpos and heap[rightpos] < heap[childpos]:
childpos = rightpos
# Move the smaller child up.
--- 234,238 ----
# Set childpos to index of smaller child.
rightpos = childpos + 1
! if rightpos < endpos and heap[rightpos] <= heap[childpos]:
childpos = rightpos
# Move the smaller child up.