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.