One proposal is to make it so `g` gets assigned a list, and the `yield` happens in the enclosing scope (so the enclosing function would have to be a generator). This was the way things worked in Python 2, I believe.Another proposal is to make this code a syntax error, because it's confusing either way. (For what it's worth, that would be my preference.)