Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83dcf5a commit b286591Copy full SHA for b286591
1 file changed
Doc/lib/libheapq.tex
@@ -45,7 +45,7 @@ \section{\module{heapq} ---
45
46
\begin{funcdesc}{heappop}{heap}
47
Pop and return the smallest item from the \var{heap}, maintaining the
48
-heap invariant.
+heap invariant. If the heap is empty, \exception{IndexError} is raised.
49
\end{funcdesc}
50
51
\begin{funcdesc}{heapify}{x}
@@ -55,6 +55,7 @@ \section{\module{heapq} ---
55
\begin{funcdesc}{heapreplace}{heap, item}
56
Pop and return the smallest item from the \var{heap}, and also push
57
the new \var{item}. The heap size doesn't change.
58
+If the heap is empty, \exception{IndexError} is raised.
59
This is more efficient than \function{heappop()} followed
60
by \function{heappush()}, and can be more appropriate when using
61
a fixed-size heap. Note that the value returned may be larger
0 commit comments