A note on heapq module

Paul Rubin http
Thu Jan 18 18:59:53 EST 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