A note on heapq module

Paul Rubin http
Fri Jan 19 00:59:53 CET 2007


Steven Bethard <steven.bethard at gmail.com> writes:
>      Heap(sequence=None, inplace=False)
>      KeyedHeap(key, sequence=None)
> Of course, this approach ends up with a bunch of code duplication again.

Maybe there's a way to use a metaclass that can make either type of
heap but they'd share most methods.



More information about the Python-list mailing list