
June 7, 2015
7:42 p.m.
Nick Coghlan writes:
(It's also worth noting that "as" clauses are specifically for binding to a name, while the LHS of an assignment statement allows attributes, indexing, slicing and tuple unpacking)
+1 (and the point that it's a *binding*, not an assignment, deserves a lot more than a parenthesized aside).
In this particular case, the variant that has always seemed most attractive to me in past discussions is a general purpose "named subexpression" construct that's just a normal local name binding operation affecting whatever namespace the expression is executed in.
Yes, please!