8000 Show the function signature in the docstring · python/cpython@bca2209 · GitHub
[go: up one dir, main page]

Skip to content

Commit bca2209

Browse files
committed
Show the function signature in the docstring
1 parent 86af581 commit bca2209

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/_heapqmodule.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ heappush(PyObject *self, PyObject *args)
141141
}
142142

143143
PyDoc_STRVAR(heappush_doc,
144-
"Push item onto heap, maintaining the heap invariant.");
144+
"heappush(heap, item) -> None. Push item onto heap, maintaining the heap invariant.");
145145

146146
static PyObject *
147147
heappop(PyObject *self, PyObject *heap)
@@ -209,7 +209,7 @@ heapreplace(PyObject *self, PyObject *args)
209209
}
210210

211211
PyDoc_STRVAR(heapreplace_doc,
212-
"Pop and return the current smallest value, and add the new item.\n\
212+
"heapreplace(heap, item) -> value. Pop and return the current smallest value, and add the new item.\n\
213213
\n\
214214
This is more efficient than heappop() followed by heappush(), and can be\n\
215215
more appropriate when using a fixed-size heap. Note that the value\n\
@@ -256,7 +256,7 @@ heappushpop(PyObject *self, PyObject *args)
256256
}
257257

258258
PyDoc_STRVAR(heappushpop_doc,
259-
"Push item on the heap, then pop and return the smallest item\n\
259+
"heappushpop(heap, item) -> value. Push item on the heap, then pop and return the smallest item\n\
260260
from the heap. The combined action runs more efficiently than\n\
261261
heappush() followed by a separate call to heappop().");
262262

0 commit comments

Comments
 (0)
0