[docs] [issue30023] Example code becomes invalid for "Why do lambdas defined in a loop with different values all return the same result?"
Eric V. Smith
report at bugs.python.org
Sun Apr 9 10:29:22 EDT 2017
Eric V. Smith added the comment:
That's consistent with the example: it's showing you how to create a list of functions, that when called, return squares.
"This gives you a list that contains 5 lambdas that calculate x**2"
Maybe "squares" isn't the most awesome name, but I think if you read the example in its entirety, it's all consistent and correct.
----------
nosy: +eric.smith
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30023>
_______________________________________
More information about the docs
mailing list