heapq creates and works with min-heaps. Currently, the only way to do this is to use _heapify_max instead of heapify, heapq._heappop_max instead of heapq.heappop, etc.
These methods should be exposed using a reverse keyword argument rather than as private methods just like sort. Best, Neil
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/