It's still odd though. Why does object() == Anything() pass control to the right hand side, while (lambda: None) == Anything() doesn't? There's no definition of equality in PyFunction_Type, so it would seem to fall back on the definition in PyBaseObject_Type, which I would expect to return False from the code in object_richcompare()... [...gdb...] OK, here's the solution of the mystery. do_richcompare() ends up taking the swapped code path for object() == Anything(), but not for function objects. This is because Anything() is a subclass of object, but not of . Perhaps the solution is to change object_richcompare() to return NotImplemented instead of returning False? Or perhaps even remove object_richcompare() altogether, since it doesn't do anything that do_richcompare() doesn't know how to do...