[issue8353] Negative exponentiation behaving oddly in python shell

2010-04-08 Thread Chris Ward
New submission from Chris Ward : When using exponentiation interactively in the python shell, it returns all negative results when a negative number is the input. For example: -4 ** 2 will return -16 -4 ** 2 should evaluate as -4 * -4, which correctly returns 16 This does not occur when using

[issue8353] Negative exponentiation behaving oddly in python shell

2010-04-08 Thread Chris Ward
Chris Ward added the comment: Thanks for clearing that up and pointing me in the right direction. I should have tested print first. The assumption was based on the evaluation of (-4) ** 2 within an expression, which does return correctly. I hadn't made the distinction that the parent