semantics of ** (unexpected/inconsistent?)

Esmail ebonak at
Mon Nov 30 01:58:06 CET 2009

Brian J Mingus wrote:
> I think you answered your own question. 3**2 comes first in the order of 
> operations, followed by the negation.

No, that's not the problem, I'm ok with the operator precedence of - vs **

My problem is why I don't get the same result if I use the literal -3 or
a variable that contains -3 (x in my example).

More information about the Python-list mailing list