Cliff Wells wrote:
A potential solution would to be to use a different keyword than "yield" to separate current syntax from my proposed syntax
But inserting any kind of keyword into LCs is going to make them ugly and verbose. The point of having LCs in the first place is that they express certain kinds of things very concisely. Adding keywords and colons to them messes that up.
Likewise with conditional expressions. It would be disappointing if, instead of
x = a if b else c
we had to write
x = if a: b else: c
Colons in the middle of expressions look ugly, IMO.