On 8 February 2013 15:39, Chris Withers <[email protected]> wrote:
> Hi All,
>
> Just had a bit of an embarrassing incident in some code where I did:
>
> sometotal =+ somevalue
>
> I'm curious why this syntax is allowed? I'm sure there are good reasons, but
> thought I'd ask...

Because '+' can represent an unary prefix operator just the same as '-':

>>> +  + -- ++- +- -+ ++3
-3


Oscar
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to