
Oct. 26, 2021
8:15 a.m.
On 26/10/2021 02:56, Steven D'Aprano wrote:
On Tue, Oct 26, 2021 at 01:32:58AM +0100, Rob Cliffe via Python-ideas wrote:
Syntax bikeshedding: I still favour var := expr That clashes with the walrus operator. Remember that the walrus operator can appear inside the expression:
var:=spam+eggs:=(something+other) or eggs
Sorry, I finally understood your point. I still don't see a problem. This would be legal: def f(var:=spam+(eggs:=(something+other) or egg)): just as def f(var=spam+(eggs:=(something+other) or egg)): is currently legal. (The extra pair of parentheses I added are necessary.) Rob Cliffe