On Feb 20, 2020, at 23:56, Alex Hall
This is a proposal for a new syntax where a comprehension is written as the appropriate brackets containing a loop which can contain arbitrary statements.
What happens if there’s a yield expression (that isn’t just ignored and used as an expression statement)? Probably not too common inside comprehensions, but there’s no reason you can’t write `[(yield None) for _ in range(3)]` to gather the first three values sent into your generator—and there might be much more common uses that come up once comprehensions can contain arbitrarily complex expressions. Does this now just collect up three None values? Does it still accept sends from the caller of the generator function it’s embedded in? What if the generator function yields from a generator expression with a yield expression in it? For that matter, what does yield from inside a comprehension do?