class Foo(object):
    def __eq__(self, other):
        return True if isinstance(other, Foo) else NotImplemented
    def foo(self):
        pass

print Foo().foo == Foo().foo
print [].__repr__ == [].__repr__
print [].append == [].append