(expr, x)
return res
Find the exponents of ``x`` (not including zero) in ``expr``.

    >>> from sympy.integrals.meijerint import _exponents
    >>> from sympy.abc import x, y
    >>> from sympy import sin
    >>> _exponents(x, x)
    set([1])
    >>> _exponents(x**2, x)
    set([2])
    >>> _exponents(x**2 + x, x)
    set([1, 2])
    >>> _exponents(x**3*sin(x + x**y) + 1/x, x)
    set([-1, 1, 3, y])
Find the exponents of ``x`` (not including zero) in ``expr``.
Find the exponents of x ( not including zero ) in expr .
def _exponents(expr, x):
    """
    Find the exponents of ``x`` (not including zero) in ``expr``.

    >>> from sympy.integrals.meijerint import _exponents
    >>> from sympy.abc import x, y
    >>> from sympy import sin
    >>> _exponents(x, x)
    set([1])
    >>> _exponents(x**2, x)
    set([2])
    >>> _exponents(x**2 + x, x)
    set([1, 2])
    >>> _exponents(x**3*sin(x + x**y) + 1/x, x)
    set([-1, 1, 3, y])
    """
    def _exponents_(expr, x, res):
        if expr == x:
            res.update([1])
            return
        if expr.is_Pow and expr.base == x:
            res.update([expr.exp])
            return
        for arg in expr.args:
            _exponents_(arg, x, res)
    res = set()
    _exponents_(expr, x, res)
    return res
def _exponents ( expr , x ) : def _exponents_ ( expr , x , res ) : if expr == x : res . update ( [ 1 ] ) return if expr . is_Pow and expr . base == x : res . update ( [ expr . exp ] ) return for arg in expr . args : _exponents_ ( arg , x , res ) res = set ( ) _exponents_ ( expr , x , res ) return res