From c6e325638482750305344fe8c408d6a4fb4f1d11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Thu, 6 Nov 2025 17:11:50 +0000 Subject: [PATCH] [3.13] Minor documentation improvements (GH-140626) (cherry picked from commit 9bf5100037f661f3a369d3ee539bec06f063b650) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com> --- Doc/library/heapq.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/library/heapq.rst b/Doc/library/heapq.rst index d3c4b920ba500a..4db2a4eca8dbbd 100644 --- a/Doc/library/heapq.rst +++ b/Doc/library/heapq.rst @@ -42,6 +42,11 @@ populated list into a heap via function :func:`heapify`. The following functions are provided: +.. function:: heapify(x) + + Transform list *x* into a heap, in-place, in linear time. + + .. function:: heappush(heap, item) Push the value *item* onto the *heap*, maintaining the heap invariant. @@ -61,11 +66,6 @@ The following functions are provided: followed by a separate call to :func:`heappop`. -.. function:: heapify(x) - - Transform list *x* into a heap, in-place, in linear time. - - .. function:: heapreplace(heap, item) Pop and return the smallest item from the *heap*, and also push the new *item*.