[Python-checkins] python/dist/src/Doc/lib libheapq.tex,1.8,1.9

rhettinger at users.sourceforge.net rhettinger at users.sourceforge.net
Sun Jun 20 05:07:56 EDT 2004


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18236/Doc/lib

Modified Files:
	libheapq.tex 
Log Message:
Improve the documented advice on how to best use heapq.heapreplace().



Index: libheapq.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libheapq.tex,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** libheapq.tex	15 Jun 2004 23:53:34 -0000	1.8
--- libheapq.tex	20 Jun 2004 09:07:53 -0000	1.9
***************
*** 60,64 ****
  by  \function{heappush()}, and can be more appropriate when using
  a fixed-size heap.  Note that the value returned may be larger
! than \var{item}!  That constrains reasonable uses of this routine.
  \end{funcdesc}
  
--- 60,68 ----
  by  \function{heappush()}, and can be more appropriate when using
  a fixed-size heap.  Note that the value returned may be larger
! than \var{item}!  That constrains reasonable uses of this routine
! unless written as part of a larger expression:
! \begin{verbatim}
!         result = item <= heap[0] and item  or  heapreplace(heap, item)
! \end{verbatim}
  \end{funcdesc}
  




More information about the Python-checkins mailing list