-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
gh-110067: Make max heap methods public and add missing ones #130725
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are various things to change. I don't know why we should expose the Python implementation and not the C implementation which is faster.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I was working on the C implementation, my bad! |
I have made the requested changes; please review again |
Thanks for making the requested changes! @picnixz: please review the changes made to this pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would group _max
with their non-max variants and update their descriptions since they are effictively different.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
I'm converting into a draft until the comments are addressed. In addition, since we are now having code duplication for |
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
I have made the requested changes; please review again We can leave de-duplication for later. |
Thanks for making the requested changes! @picnixz: please review the changes made to this pull request. |
Co-authored-by: Petr Viktorin <encukou@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue your PR is solving is called "maxheap version of a heappush", but the PR is missing a C implementation of "heappush_max".
I put more suggestions in StanFromIreland#1. |
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
max-heaps: Reword the docs, add more tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more editing pass, and let's get this into 3.14 beta.
There'll be time until July to adjust the tests/docs/implementation, or revert the feature entirely.
Made public, added test (same as normal heap) and added docs.
@rhettinger has not opened the planned PR in ~2 years
📚 Documentation preview 📚: https://cpython-previews--130725.org.readthedocs.build/