Steven Bethard wrote: > The current code fails when using unbound methods however::
I don't like your solution, this class was already slow enough. Don't use unbound methods with this class :-) Maybe there's a (better) solution to your problem: to make Heap a function (or classmethod) that return sone of two possibile objects created by one of two different classes that have different methods... Beside that, I think __eq__ method needs more tests, because comparing a Heap with key against another Heap without key may give some problems... I'll think about such problems/things. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list