def __eq__(self, other):
        """self == other"""
        if self._impl.is_scalar():
            return self._impl.single_value == other
        elif isinstance(other, Cells):
            return self is other
        else:
            raise TypeError
def __eq__ ( self , other ) : if self . _impl . is_scalar ( ) : return self . _impl . single_value == other elif isinstance ( other , Cells ) : return self is other else : raise TypeError
self == other