It's used a few times in core/basic and core/logic, and once in geometry/entity. It can probably be refactored out, but one of the times it's used in basic, L178, it says:
`all redefinitions of __cmp__ method should start with the following three lines:`, with `c = cmp(self.__class__, other.__class__)` being one of them.