[Python-ideas] Heap data type, the revival

Sven R. Kunze srkunze at mail.de
Mon Oct 17 14:18:42 EDT 2016


On 16.10.2016 19:02, Nick Timkovich wrote:
> Functions are great; I'm a big fan of functions. That said, the group
> of heapq.heap* functions are literally OOP without using that "class"
> word. As far as flexibility, what is the use of the those functions on
> non-heap structures?

IIRC the statement wasn't about "non-heap structures". It was about, "I 
need a heap which does something special and subclassing might not solve 
it. So, I run my own implementation using those functions".

On the other hand, I can fully understand the need for general-purpose 
oo-heap implementation. That why I put xheap on github/PyPI.


Best,
Sven


More information about the Python-ideas mailing list