def __pow__(self, exp):
        if exp < 0:
            raise NotImplementedError
        # TODO exponentiate by squaring
        return reduce(lambda x, y: x*y, [self]*exp, self.ring.ideal(1))
dataset/ETHPy150Open sympy/sympy/sympy/polys/agca/ideals.py/Ideal.__pow__/original