From 8158e849305d0e0ab3e19cdc93a86bb7d5fc0651 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Mon, 6 Sep 2004 07:04:09 +0000 Subject: Fix erroneous docstring comment. --- Modules/_heapqmodule.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Modules/_heapqmodule.c') diff --git a/Modules/_heapqmodule.c b/Modules/_heapqmodule.c index 13e6a3d604..192e843690 100644 --- a/Modules/_heapqmodule.c +++ b/Modules/_heapqmodule.c @@ -186,8 +186,9 @@ PyDoc_STRVAR(heapreplace_doc, This is more efficient than heappop() followed by heappush(), and can be\n\ more appropriate when using a fixed-size heap. Note that the value\n\ returned may be larger than item! That constrains reasonable uses of\n\ -this routine unless written as part of a larger expression:\n\n\ - result = item <= heap[0] and item or heapreplace(heap, item)\n"); +this routine unless written as part of a conditional replacement:\n\n\ + if item > heap[0]:\n\ + item = heapreplace(heap, item)\n"); static PyObject * heapify(PyObject *self, PyObject *heap) -- cgit v1.2.1