Is there something similar to a as
keyword in list comprehensions?
Example: instead of
L = [foo(bar(baz(bla(x)))) for x in X if foo(bar(baz(bla(x)))) == 1]
it would be:
L = [foo(bar(baz(bla(x)))) as y for x in X if y == 1]
In python 3.8 you can use walrus operator to do this:
>>> L = [y for x in X if (y := foo(bar(baz(bla(x))))) == 1]