Haskell has a feature like this in comprehensions where one may write: [r + 1| n <- [1..10], let r = n * 3, r `rem` 4 == 0]
Here we are sharing the definition of `r` in both the predicate and the value expresions, we can also use the name in different expressions in both contexts.
If we were to translate this to python syntax we could have something like: [r + 1 for n in range(1, 11) for n * 3 as r if r % 4 == 0]
There is no reason that the name binding needs to be a part of the predicate expression, they can just be seperate clauses. I think the `for expr as name` is nice because it matches the order that comprehensions over multiple iterators are evaluated like: `[n for n in ns for m in ms]`.
I personally just write `map` and `filter` and then have the control to make the correct function get called first but adding something like this might make me more inclined to use comprehensions for the simple cases.