Benjamin Peterson added the comment:
https://docs.python.org/2/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result
--
nosy: +benjamin.peterson
resolution: -> not a bug
status: open -> closed
___
Pyth
New submission from Victor Liu:
I would expect bug.py to output:
foo
bar
baz
but instead we observe:
baz
baz
baz
Replicated on Windows 10 Home Edition, Python 2.7.13 (v2.7.13:a06454b1afa1, Dec
17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)]
--
files: bug.py
messages: 284224
nosy: Victo