https://github.com/python/cpython/commit/5f35f9b8fad50670604552062c1df8fbdff835ab
commit: 5f35f9b8fad50670604552062c1df8fbdff835ab
branch: main
author: Stan Ulbrych <[email protected]>
committer: rhettinger <[email protected]>
date: 2025-07-30T16:12:14-05:00
summary:
gh-137239: Add *_max functions to heapq.__all__ (gh-137241)
files:
A Misc/NEWS.d/next/Library/2025-07-30-17-42-36.gh-issue-137239.qSpj32.rst
M Lib/heapq.py
diff --git a/Lib/heapq.py b/Lib/heapq.py
index 6ceb211f1ca2ae..17f62dd2d5839b 100644
--- a/Lib/heapq.py
+++ b/Lib/heapq.py
@@ -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."""
diff --git
a/Misc/NEWS.d/next/Library/2025-07-30-17-42-36.gh-issue-137239.qSpj32.rst
b/Misc/NEWS.d/next/Library/2025-07-30-17-42-36.gh-issue-137239.qSpj32.rst
new file mode 100644
index 00000000000000..3be583ee937f8c
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2025-07-30-17-42-36.gh-issue-137239.qSpj32.rst
@@ -0,0 +1 @@
+:mod:`heapq`: Update :data:`!heapq.__all__` with ``*_max`` functions.
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]