[docs] [issue13094] Need Programming FAQ entry for the behavior of closures

R. David Murray report at bugs.python.org
Thu Jan 3 13:30:39 CET 2013


R. David Murray added the comment:

The FAQ (as in, this question gets asked again and again) is something like "why do the lambdas I define in a loop all return the same result when the input value was different when each one was defined?"

The same applies to regular functions, but people almost never do that in a loop, so in that case they are more likely to think of the scoping issue.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13094>
_______________________________________


More information about the docs mailing list