Prashant Sharma added the comment: Hey Gareth,
"add Key=" approach also solves the purpose. The purpose is to be able to use heapq as max heap too conveniently. (I just wish python had minmaxheap too, but felt that is too much to ask for.) It is a very common usage and usual tricks of inverting the values( or negating) isn't great for all purposes. I am happy to redo the patch, if that is an acceptable solution. On a side note, did we also discuss about making some public functions for using heapq as max heap. (There are a few internal functions for the same). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20905> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com