summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-06 07:04:09 +0000
committerRaymond Hettinger <python@rcn.com>2004-09-06 07:04:09 +0000
commit2b3de4175c161c9e7f3f129903014450efc110b0 (patch)
treeb24733383d1fafe8dac5da73a680ffa6c89ec804 /Doc
parente7b6db5507529060f2e6762db181a17c5b80cda4 (diff)
downloadcpython-2b3de4175c161c9e7f3f129903014450efc110b0.tar.gz
Fix erroneous docstring comment.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libheapq.tex5
1 files changed, 3 insertions, 2 deletions
diff --git a/Doc/lib/libheapq.tex b/Doc/lib/libheapq.tex
index edacf79158..55ef6412e3 100644
--- a/Doc/lib/libheapq.tex
+++ b/Doc/lib/libheapq.tex
@@ -60,9 +60,10 @@ This is more efficient than \function{heappop()} followed
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:
+unless written as part of a conditional replacement:
\begin{verbatim}
- result = item <= heap[0] and item or heapreplace(heap, item)
+ if item > heap[0]:
+ item = heapreplace(heap, item)
\end{verbatim}
\end{funcdesc}