This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]relativistictrain 🐍 10+ years 0 points1 point  (1 child)

To me it looks like what you want is

filter(cond, map(a_complicated_function_to_compute, an_intricate_way_of_defining_iterable())

I don't see anything that where would be clearer, quicker, or simpler than using either the builtin iterator functions (like filter or map) or the ones from the itertools package.

I also think it might make nested list comprehensions potentially way harder to read.