3 ms·
In Python yes, but the post I responded to asked why they settled on a different assignment syntax for expressions. It was to avoid that ambiguity (or error pr
by joshuamorton 7y ago
In Python yes, but the post I responded to asked why they settled on a different assignment syntax for expressions.
It was to avoid that ambiguity (or error prone pattern, if you prefer) which is present in, say, C.
- ryl00 7y agoC/C++ compilers (at least, all the ones I know about) squawk about it unless you add an additional set of parentheses around the assignment.