In the example at the top of the discuss thread
>>> larr = [lambda: i for i in range(10)]
>>> iarr = [l() for l in larr]
>>> iarr
[9, 9, 9, 9, 9, 9, 9, 9, 9, 9]
a comprehension is used, which already (kinda) creates it's own scope. So
that is really about lambda, not loops.
Or at least, that
Honestly, the construct of `lambda x=x: stuff(x)` in a loop or
comprehension isn't that hard to learn.
Yes, I've also forgotten it and tripped over that. But then, I've also
banged my head on the wall when I use a language with block scope and
forget that variables won't be available after the