[Python-Dev] PEP 572: Assignment Expressions

MRAB python at mrabarnett.plus.com
Fri Apr 20 19:17:50 EDT 2018


On 2018-04-20 22:33, Tim Peters wrote:
[snip]

> And I'll take this opportunity to repeat the key point for me:  I
> tried hard, but never found a single case based on staring at real
> code where allowing _fancier_ (than "plain name") targets would be a
> real improvement.  In every case I thought it _might_ help, it turned
> out that it really didn't unless Python _also_ grew an analog to C's
> "comma operator" (take only the last result from a sequence of
> expressions).  I'll also note that I asked if anyone else had a
> real-life example, and got no responses.
> 
Could a semicolon in a parenthesised expression be an equivalent to C's 
"comma operator"?

[snip]


More information about the Python-Dev mailing list