[issue14825] Interactive Shell vs Executed code

2012-05-16 Thread Mark Dickinson
Mark Dickinson added the comment: It sounds like you're seeing the difference between this: >>> n = -7 >>> n ** 0 1 and this: >>> -7 ** 0 -1 This isn't a bug; it's to do with how Python expressions are parsed: in the second case, the expression is grouped as -(7 ** 0) rather than (-7) **

[issue14825] Interactive Shell vs Executed code

2012-05-15 Thread Marcelo Delgado
Changes by Marcelo Delgado : -- components: +Interpreter Core -Regular Expressions ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14825] Interactive Shell vs Executed code

2012-05-15 Thread Marcelo Delgado
New submission from Marcelo Delgado : I have found inconsistency between running this code in the interactive shell and running it from a file: Int. Shell: n**0 ## n is a negative number result: -1 File: n**0 ## n is a negative number result: 1 I am fairly new to Python, so I don't know what