Re: [Python-Dev] PEP 572: Assignment Expressions

2018年4月17日 16:54:43 -0700

On 2018年04月17日 22:53, Terry Reedy wrote:
On 4/17/2018 3:46 AM, Chris Angelico wrote:
[snip]
Augmented assignment is not supported in expression form::
 >>> x +:= 1
 File "<stdin>", line 1
 x +:= 1
 ^
 SyntaxError: invalid syntax
I would have expected :+=, but agree with the omission.
x = x op 1 is abbreviated to x op= 1, so x := x op 1 would be abbreviated to x op:= 1. That's what's used in the Icon language.
[snip]
_______________________________________________
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to