News for hackers. Stuff that matters.
Re:“I'm basically giving myself a permanent vacation from be... by abecedarius on Thursday July 12, 2018 @04:33PM (#17518364)
You can in fact factor out expressions in list comprehensions, like:

    [foo(y, y) for x in xs for y in [f(x)]]
Is this Pythonic? Perhaps not, but mainly because multiline list comprehensions are frowned on in general. I think people tend to get too dogmatic about that.

There are no comments on this comment yet.