(self, other)
return 0
Return -1, 0, 1 if the object is smaller, equal, or greater than other.

        Not in the mathematical sense. If the object is of a different type
        from the "other" then their classes are ordered according to
        the sorted_classes list.

        Examples
        ========

        >>> from sympy.abc import x, y
        >>> x.compare(y)
        -1
        >>> x.compare(x)
        0
        >>> y.compare(x)
        1
Return -1, 0, 1 if the object is smaller, equal, or greater than other.
Return - 1 0 1 if the object is smaller equal or greater than other .
def compare(self, other):
        """
        Return -1, 0, 1 if the object is smaller, equal, or greater than other.

        Not in the mathematical sense. If the object is of a different type
        from the "other" then their classes are ordered according to
        the sorted_classes list.

        Examples
        ========

        >>> from sympy.abc import x, y
        >>> x.compare(y)
        -1
        >>> x.compare(x)
        0
        >>> y.compare(x)
        1

        """
        # all redefinitions of __cmp__ method should start with the
        # following lines:
        if self is other:
            return 0
        n1 = self.__class__
        n2 = other.__class__
        c = (n1 > n2) - (n1 < n2)
        if c:
            return c
        #
        st = self._hashable_content()
        ot = other._hashable_content()
        c = (len(st) > len(ot)) - (len(st) < len(ot))
        if c:
            return c
        for l, r in zip(st, ot):
            if isinstance(l, Basic):
                c = l.compare(r)
            elif isinstance(l, frozenset):
                c = 0
            else:
                c = (l > r) - (l < r)
            if c:
                return c
        return 0
def compare ( self , other ) : # all redefinitions of __cmp__ method should start with the # following lines: if self is other : return 0 n1 = self . __class__ n2 = other . __class__ c = ( n1 > n2 ) - ( n1 < n2 ) if c : return c # st = self . _hashable_content ( ) ot = other . _hashable_content ( ) c = ( len ( st ) > len ( ot ) ) - ( len ( st ) < len ( ot ) ) if c : return c for l , r in zip ( st , ot ) : if isinstance ( l , Basic ) : c = l . compare ( r ) elif isinstance ( l , frozenset ) : c = 0 else : c = ( l > r ) - ( l < r ) if c : return c return 0