(self, other)
return self._hashable_content() == other._hashable_content()
Return a boolean indicating whether a == b on the basis of
        their symbolic trees.

        This is the same as a.compare(b) == 0 but faster.

        Notes
        =====

        If a class that overrides __eq__() needs to retain the
        implementation of __hash__() from a parent class, the
        interpreter must be told this explicitly by setting __hash__ =
        <ParentClass>.__hash__. Otherwise the inheritance of __hash__()
        will be blocked, just as if __hash__ had been explicitly set to
        None.

        References
        ==========

        from http://docs.python.org/dev/reference/datamodel.html#object.__hash__
Return a boolean indicating whether a == b on the basis of
        their symbolic trees.
Return a boolean indicating whether a == b on the basis of their symbolic trees .
def __eq__(self, other):
        """Return a boolean indicating whether a == b on the basis of
        their symbolic trees.

        This is the same as a.compare(b) == 0 but faster.

        Notes
        =====

        If a class that overrides __eq__() needs to retain the
        implementation of __hash__() from a parent class, the
        interpreter must be told this explicitly by setting __hash__ =
        <ParentClass>.__hash__. Otherwise the inheritance of __hash__()
        will be blocked, just as if __hash__ had been explicitly set to
        None.

        References
        ==========

        from http://docs.python.org/dev/reference/datamodel.html#object.__hash__
        """

        if self is other:
            return True

        from .function import AppliedUndef, UndefinedFunction as UndefFunc

        if isinstance(self, UndefFunc) and isinstance(other, UndefFunc):
            if self.class_key() == other.class_key():
                return True
            else:
                return False
        if type(self) is not type(other):
            # issue 6100 a**1.0 == a like a**2.0 == a**2
            while isinstance(self, C.Pow) and self.exp == 1:
                self = self.base
            while isinstance(other, C.Pow) and other.exp == 1:
                other = other.base
            try:
                other = _sympify(other)
            except SympifyError:
                return False    # sympy != other

            if isinstance(self, AppliedUndef) and isinstance(other,
                                                             AppliedUndef):
                if self.class_key() != other.class_key():
                    return False
            elif type(self) is not type(other):
                return False

        return self._hashable_content() == other._hashable_content()
def __eq__ ( self , other ) : if self is other : return True from . function import AppliedUndef , UndefinedFunction as UndefFunc if isinstance ( self , UndefFunc ) and isinstance ( other , UndefFunc ) : if self . class_key ( ) == other . class_key ( ) : return True else : return False if type ( self ) is not type ( other ) : # issue 6100 a**1.0 == a like a**2.0 == a**2 while isinstance ( self , C . Pow ) and self . exp == 1 : self = self . base while isinstance ( other , C . Pow ) and other . exp == 1 : other = other . base try : other = _sympify ( other ) except SympifyError : return False # sympy != other if isinstance ( self , AppliedUndef ) and isinstance ( other , AppliedUndef ) : if self . class_key ( ) != other . class_key ( ) : return False elif type ( self ) is not type ( other ) : return False return self . _hashable_content ( ) == other . _hashable_content ( )