Re:PEP 572: Python assignment expressions has been accepted
by eswoo on Thursday July 12, 2018 @08:21PM
(#17519674)
It needs to be
[bar(foo(y)) for y in (z for z in stuff if foo(z))]
(etc.) though, since `bar` takes as input the output of `foo`. This leads to the objectionable duplicate calls to `foo`, hence the new assignment expressions.
I like Dunnorandom's
[bar(x) for x in map(foo, stuff) if x]
best for a correct result using existing syntax, or
I like Dunnorandom's
best for a correct result using existing syntax, or if you don't like `map`.