summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-06 07:04:09 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-09-06 07:04:09 (GMT)
commit8158e849305d0e0ab3e19cdc93a86bb7d5fc0651 (patch)
treebf2e3439c231960aef92109f2c4f032db1623375 /Doc/lib
parent7d3755d2c0d6d586308666b1dddf185f0169c320 (diff)
downloadcpython-8158e849305d0e0ab3e19cdc93a86bb7d5fc0651.zip
cpython-8158e849305d0e0ab3e19cdc93a86bb7d5fc0651.tar.gz
cpython-8158e849305d0e0ab3e19cdc93a86bb7d5fc0651.tar.bz2
Fix erroneous docstring comment.
Diffstat (limited to 'Doc/lib')
-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 edacf79..55ef641 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}