Many times when using the heapq lib I had to convert my array to negative 
values so that it could behave like a max heap. Maybe we should pass in a 
parameter in the functions to specify if we want a max heap behaviour or a min 
heap behaviour.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/S5EF5VZKNGJCYA7NQM5ESUZJC4DXXDV4/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to