[Python-Dev] PEP 572: Assignment Expressions
MRAB
python at mrabarnett.plus.com
Tue Apr 24 14:10:36 EDT 2018
More information about the Python-Dev mailing list
Tue Apr 24 14:10:36 EDT 2018
- Previous message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Next message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 2018-04-21 03:15, Tim Peters wrote: > [Tim] > >> 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. > > [MRAB <python at mrabarnett.plus.com>] > > Could a semicolon in a parenthesised expression be an equivalent to C's > > "comma operator"? > > I expect it could, but I it's been many years since I tried hacking > Python's grammar, and I wouldn't want a comma operator anyway ;-) [snip] Just reading this: https://www.bfilipek.com/2018/04/refactoring-with-c17-stdoptional.html about C++17, and what did I see? An example with a semicolon in parentheses!
- Previous message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Next message (by thread): [Python-Dev] PEP 572: Assignment Expressions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list