It will be nice if comprehension syntax respects the local variables defined in if clause.
For example, filter_map of Ruby 2.7 or Rust will be implemented as follows
filter_map(f, a) = (y for x in a if (y=f(x)) !== nothing)
Python 3.8 will introduce the assignment expressions which makes this possible.
https://docs.python.org/3.8/whatsnew/3.8.html
https://www.python.org/dev/peps/pep-0572/#simplifying-list-comprehensions