sympy/sympy — pull request #1189 by ashfall (2012-03-30 20:08:53+00:00)
Title: 3186: Fix pprint for Pow, keep powers unevaluated when evaluate = False

Presently, pprint (Pow( a, b, evaluate=False)) evaluates the power as 1/(a**b), when b<0.

I have refactored the code to add a helper function _print_base_exp() that takes in the base and exponent separately and works with them. I also eliminated any calls to Pow() within these segments.

Now,
>>>pprint (Pow( 2, -5, evaluate=False))
gives:

-5
2