On 2013-02-08, at 16:39 , Chris Withers 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⦠sometotal = (expression) is valid syntax, and +value is valid syntax. Thus what you wrote is perfectly normal syntax, it's the assignment of a pos'd value, badly formatted. pep8.py will warn against it (it'll complain that the whitespace around `+` is wonky). But I see no justification for disallowing this, anymore than for disallowing the rougly equivalent (and just as error-prone) `sometotal = -somevalue`.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4