[Python-checkins] python/dist/src/Doc/lib libheapq.tex,1.4,1.5
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Wed, 07 Aug 2002 11:56:10 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv6810
Modified Files:
libheapq.tex
Log Message:
Document that heappop() and heapreplace() raise IndexError if the heap
is empty.
Index: libheapq.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libheapq.tex,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** libheapq.tex 3 Aug 2002 18:53:28 -0000 1.4
--- libheapq.tex 7 Aug 2002 18:56:08 -0000 1.5
***************
*** 46,50 ****
\begin{funcdesc}{heappop}{heap}
Pop and return the smallest item from the \var{heap}, maintaining the
! heap invariant.
\end{funcdesc}
--- 46,50 ----
\begin{funcdesc}{heappop}{heap}
Pop and return the smallest item from the \var{heap}, maintaining the
! heap invariant. If the heap is empty, \exception{IndexError} is raised.
\end{funcdesc}
***************
*** 56,59 ****
--- 56,60 ----
Pop and return the smallest item from the \var{heap}, and also push
the new \var{item}. The heap size doesn't change.
+ If the heap is empty, \exception{IndexError} is raised.
This is more efficient than \function{heappop()} followed
by \function{heappush()}, and can be more appropriate when using