
Steven D'Aprano writes:
I believe that Serhiy has optimized the case where a comprehension loops over a singleton list or tuple.
Yeah, I missed that.
We are well-used to reading parenthesized expressions, though.
Just because we're used to them doesn't make them easy to read.
I didn't say that. I said that it's not clear to me that that (as yet unproposed) change has big enough advantages to be added to the stdlib, and being used to parentheses is one reason for that.
It's also not obvious to me that the often awkward comprehension syntax that puts the element-wise transformation first isn't frequently optimal.
My brain can't parse that sentence. Are you for it or against that "often awkward comprehension syntax"?
Why not both? Sometimes it's awkward, sometimes it's optimal.
Julia (if I recall correctly) has a nice syntax for automatically turning any function or method into an element-wise function:
Sure, but syntax is not (yet) what we're talking about here.