[issue42240] Add Maxheap version of a heappush into heapq module

2020-12-04 Thread Matteo Dell'Amico
Matteo Dell'Amico added the comment: Personally, I'd find a maxheap in the standard library helpful, and a quick Google search tells me I'm not alone. I generally have to deal with numeric values, so I have these choices: - ugly code (e.g., `minus_distance, elem = heappop(heap)`, `distance =

[issue42240] Add Maxheap version of a heappush into heapq module

2020-11-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Only the minheap is in the public API. The maxheap functions are only supposed to be used internally. Thank you for the suggestion, but I think we should decline. -- resolution: -> rejected stage: -> resolved status: open -> closed ___

[issue42240] Add Maxheap version of a heappush into heapq module

2020-11-02 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue42240] Add Maxheap version of a heappush into heapq module

2020-11-01 Thread Rudresh Veerkhare
New submission from Rudresh Veerkhare : Main functions required to implement Heap data structure are: function heappush - to push an element in Heap function heappop - to pop an element from Heap for implementing Minheap this functions are present in the module as : heappush - for adding elem