This operator is not ported to python.  (Neither is op< below.)  So the python `x == y` has nothing to do with this function.  I'm not sure how python defines op== for boost python classes.

But to your first question, `this` is the pointer to the current object.  `&rhs` is the pointer to `rhs`.  If the pointers are equal, then we don't have to test the elements, since the two objects are the same locations in memory.  It's a standard trick to save some time when evaluating `a == a`, which isn't as non-sensical as it sounds, since you may not realize that two variables actually refer to the same object.