3 ms·
I think a better format would be: instead of: p(2 * 3 * 7) #=> 42 ^^^^^var Having: p(var1:[2*3] * var2: 7) => 42 p(var1) => 6 p(var2)
by gremlinsinc 6y ago
I think a better format would be:
instead of:
p(2 * 3 * 7) #=> 42
^^^^^var
Having:
p(var1:[2*3] * var2: 7) => 42
p(var1) => 6
p(var2) => 7
The other requires ugly whitespacing.
- nwatson 6y agoIt kind of works in Python 3.9 and perhaps earlier, unfortunately need extra parentheses ... >>> print((v1 := 2 * 3) * (v2 := 7)) 42 >>> print(v1) 6 >>> print(v2) 7 edit: formatting