[issue13094] setattr misbehaves when used with lambdas inside for loop
3 Oct
2011
3 Oct
'11
9:45 a.m.
R. David Murray <rdmurray@bitdance.com> added the comment: Sorry. It is intended behavior. The lambda 'each' is bound to the local 'each', and by the time the lambda's execute, the value of 'each' is 'baz'. I'm going to turn this into a doc bug, because while I'm pretty sure this is documented *somewhere*, I don't see it in the programming FAQ, and it should be there. ---------- assignee: -> docs@python components: +Documentation -None nosy: +docs@python, r.david.murray stage: -> needs patch type: -> behavior versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue13094> _______________________________________
4786
Age (days ago)
4786
Last active (days ago)
0 comments
1 participants
participants (1)
-
R. David Murray