Skip to content

[3.14] gh-137239: Add *_max functions to heapq.__all__ (gh-137241) #137256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 3.14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-137239: Add *_max functions to heapq.__all__ (gh-137241)
(cherry picked from commit 5f35f9b)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
  • Loading branch information
StanFromIreland authored and miss-islington committed Jul 30, 2025
commit a7005b7182ce11daf8af8b95d6713562154bd2ff
5 changes: 3 additions & 2 deletions Lib/heapq.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@
From all times, sorting has always been a Great Art! :-)
"""

__all__ = ['heappush', 'heappop', 'heapify', 'heapreplace', 'merge',
'nlargest', 'nsmallest', 'heappushpop']
__all__ = ['heappush', 'heappop', 'heapify', 'heapreplace', 'heappushpop',
'heappush_max', 'heappop_max', 'heapify_max', 'heapreplace_max',
'heappushpop_max', 'nlargest', 'nsmallest', 'merge']

def heappush(heap, item):
"""Push item onto heap, maintaining the heap invariant."""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:mod:`heapq`: Update :data:`!heapq.__all__` with ``*_max`` functions.
Loading