Tom Anderson wrote:

> Yes. However, it's an excellent reason why python's precedence
> rules are wrong - in conventional mathematical notation, the unary
> minus, used to denote the sign of a literal number, does indeed
> have higher precedence than exponentiation: -1^2 evaluates to 1,
> not -1. 

        This isn't true.  The "unary minus operator" is just a shorthand 
for multiplication by -1.  As such, it has the same operator precedence 
as multiplication.

-- 
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead.  Go, instead, where there is
no path, and leave a trail."
        --author unknown
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to