[Python-ideas] Reverse assignment operators (=+, =-, =*, =/, =//, =**, =%)

Brendan Barnwell brenbarn at brenbarn.net
Sat Nov 12 15:22:20 EST 2016


On 2016-11-12 12:18, João Matos wrote:> Hello,
 >
 > What I propose is not
 > a = +5 (see the space between the = and + sign)
 > but
 > a =+ 5 (no space between the = and + sign, and there is a space between
 > + and 5)
 >
 > Exactly the same notation (only reversed) as the current assignment
 > operators.

	The thing is that a =+ 5 is already valid syntax, and means the same as 
a = +5.  You don't need spaces around operators in Python.  So your 
proposal would have the change the behavior of existing syntax, which 
pretty much makes it a nonstarter.

-- 
Brendan Barnwell
"Do not follow where the path may lead.  Go, instead, where there is no 
path, and leave a trail."
    --author unknown


More information about the Python-ideas mailing list