On Fri, Mar 11, 2016 at 2:42 PM, João Bernardo firstname.lastname@example.org wrote:
On Thu, Mar 10, 2016 at 7:20 PM, Michał Żukowski email@example.com wrote:
(x+y)**2 + (x-y)**2 where x=1, y=2
So for list comprehension I can write:
[stripped for line in lines if stripped where stripped=line.strip()]
Why are we not funding this? But seriously, why? This is great.
One cool thing about this 'where' thing is that, if it made a new scope on every iteration, you could do
[lambda x: x * j for i in range(10) where j = i]
and it would actually create ten *different* functions (as opposed to without the 'where j = i').