|
|
|
|
|
by wk_end
665 days ago
|
|
In that case I think the "Pythonic" thing to do would be to have some named intermediate steps: foos = (make_foo(bar) for bar in bars)
acceptable_foos = (foo for foo in foos if acceptable(foo))
...
Depending on your circumstances, this may or may not be awkward (coming up with temporary names can be hard), or may or may not be a good idea anyway (naming things can help make the code more self-documenting). I can't reckon how it could become unreadable, per se - what do you mean by that? |
|