June 27, 2013
10:54 a.m.
On Jun 27, 2013, at 5:19, Nick Coghlan <ncoghlan@gmail.com> wrote:
FWIW, while I actually agree with you that "else return" doesn't fit because people *think* of comprehensions and generator as loops rather than as nested functions, they *are* defined as following the scoping rules of a nested function and CPython actually implements them that way:
I thought it was decided to explicitly add comprehensions as a new place that defines a scope, to avoid the confusion of calling them functions? I may be remembering wrong; I'll read over the docs later.