:

> v = 2
> v**v = 2**2 = 4
> v**v**v = 2**2**2 = 16
> v**v**v**v = 2**2**2**2 = 65536
>
> I would expect 2**2**2**2 to be 256

"... in an unparenthesized sequence of power and unary operators, the
operators are evaluated from right to left ..."
 - http://docs.python.org/ref/power.html

So, 2**2**2**2 = 2**(2**(2**2)) = 65536

 -[]z.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to