(a, b)
Return True if a and b are structurally the same, else False.

    Examples
    ========

    To SymPy, 2.0 == 2:

    >>> from sympy import S
    >>> 2.0 == S(2)
    True

    Since a simple 'same or not' result is sometimes useful, this routine was
    written to provide that query:

    >>> from sympy.core.basic import _aresame
    >>> _aresame(S(2.0), S(2))
    False
Return True if a and b are structurally the same, else False.
Return True if a and b are structurally the same else False .
def _aresame(a, b):
    """Return True if a and b are structurally the same, else False.

    Examples
    ========

    To SymPy, 2.0 == 2:

    >>> from sympy import S
    >>> 2.0 == S(2)
    True

    Since a simple 'same or not' result is sometimes useful, this routine was
    written to provide that query:

    >>> from sympy.core.basic import _aresame
    >>> _aresame(S(2.0), S(2))
    False

    """
    from .function import AppliedUndef, UndefinedFunction as UndefFunc
    for i, j in zip_longest(preorder_traversal(a), preorder_traversal(b)):
        if i != j or type(i) != type(j):
            if ((isinstance(i, UndefFunc) and isinstance(j, UndefFunc)) or
                (isinstance(i, AppliedUndef) and isinstance(j, AppliedUndef))):
                if i.class_key() != j.class_key():
                    return False
            else:
                return False
    else:
        return True
def _aresame ( a , b ) : from . function import AppliedUndef , UndefinedFunction as UndefFunc for i , j in zip_longest ( preorder_traversal ( a ) , preorder_traversal ( b ) ) : if i != j or type ( i ) != type ( j ) : if ( ( isinstance ( i , UndefFunc ) and isinstance ( j , UndefFunc ) ) or ( isinstance ( i , AppliedUndef ) and isinstance ( j , AppliedUndef ) ) ) : if i . class_key ( ) != j . class_key ( ) : return False else : return False else : return True