

@staticmethod
def Pow(expr, assumptions):
    '\n        Imaginary**Odd        -> Imaginary\n        Imaginary**Even       -> Real\n        b**Imaginary          -> !Imaginary if exponent is an integer multiple of I*pi/log(b)\n        Imaginary**Real       -> ?\n        Positive**Real        -> Real\n        Negative**Integer     -> Real\n        Negative**(Integer/2) -> Imaginary\n        Negative**Real        -> not Imaginary if exponent is not Rational\n        '
    if expr.is_number:
        return AskImaginaryHandler._number(expr, assumptions)
    if (expr.base.func == exp):
        if ask(Q.imaginary(expr.base.args[0]), assumptions):
            if ask(Q.imaginary(expr.exp), assumptions):
                return False
            i = ((expr.base.args[0] / I) / pi)
            if ask(Q.integer((2 * i)), assumptions):
                return ask(Q.imaginary((((- 1) ** i) ** expr.exp)), assumptions)
    if ask(Q.imaginary(expr.base), assumptions):
        if ask(Q.integer(expr.exp), assumptions):
            odd = ask(Q.odd(expr.exp), assumptions)
            if (odd is not None):
                return odd
            return
    if ask(Q.imaginary(expr.exp), assumptions):
        imlog = ask(Q.imaginary(log(expr.base)), assumptions)
        if (imlog is not None):
            return False
    if ask((Q.real(expr.base) & Q.real(expr.exp)), assumptions):
        if ask(Q.positive(expr.base), assumptions):
            return False
        else:
            rat = ask(Q.rational(expr.exp), assumptions)
            if (not rat):
                return half
            if ask(Q.integer(expr.exp), assumptions):
                return False
            else:
                half = ask(Q.integer((2 * expr.exp)), assumptions)
                if half:
                    return ask(Q.negative(expr.base), assumptions)
                return half

dataset/ETHPy150Open sympy/sympy/sympy/assumptions/handlers/sets.py AskImaginaryHandler.Pow/VarMisuse@355/537 `rat`->`half`