You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Functions with a leading underscore are private -- i.e. _heappush_max should not be used outside heapq itself. It should be named without an underscore, and it would also need documentation and tests.
Raymond said he's working on public maxheap functions. If you'd like to work on this, perhaps ask if he's still on it.
@rhettinger 👋 Would you like any help on this? Recently I reached for a max-heap in python and was surprised it didn't exist. Saw this thread and wondered if this is still on anyone's radar, since it was not released with 3.13.
Activity
encukou commentedon Mar 4, 2024
Functions with a leading underscore are private -- i.e.
_heappush_maxshould not be used outsideheapqitself. It should be named without an underscore, and it would also need documentation and tests.Raymond said he's working on public maxheap functions. If you'd like to work on this, perhaps ask if he's still on it.
rhettinger commentedon Mar 13, 2024
Yes, I've still got this.
tnightengale commentedon Nov 24, 2024
@rhettinger 👋 Would you like any help on this? Recently I reached for a max-heap in python and was surprised it didn't exist. Saw this thread and wondered if this is still on anyone's radar, since it was not released with 3.13.
Teut2711 commentedon Dec 13, 2024
Anyone still working on it ?
8:01.44 O(n logn) quick fix
gh-110067: Make max heap methods public and add missing ones (GH-130725)
StanFromIreland commentedon May 6, 2025
This can be closed now. I will add some further documentation updates in a follow up.
encukou commentedon May 7, 2025
You could reuse this issue.
StanFromIreland commentedon May 7, 2025
I had already created #133530, apologies, it just seemed a bit messy to use this one since there is a lot of unrelated comments.
encukou commentedon May 8, 2025
That works too, especially if the changes aren't all related to max-heaps. (But, I wouldn't close before adding the link to the follow-up.)
@rhettinger: Please feel free to reopen if you want (us) to rework or remove the feature. There's time for than until July 28.
pythongh-110067: Make max heap methods public and add missing ones (p…
pythongh-110067: Improve max-heap documentation across heapq module
pythongh-110067: Optimize nlargest/nsmallest and improve max-heap C d…
Add news entry for pythongh-110067
Add news entry for pythongh-110067 docs improvements
pythongh-110067: Optimize nlargest/nsmallest and improve max-heap C d…