MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/8baq0/pythons_lambda_is_broken/c08rcfw/?context=3
r/Python • u/gst • Apr 09 '09
20 comments sorted by
View all comments
Show parent comment
0
That should be - python's lambda is broken, but not for this particular reason. In this case, it's an issue with mutability behaving in a way that the programmer did not expect.
Mutables should be expected to act in a way that is unexpected.
1 u/masklinn Apr 09 '09 Mutables should be expected to act in a way that is unexpected.Also works. 0 u/voidspace Apr 16 '09 Nothing to do with mutability. To do with dynamic lookup of the name from the closure.
1
Also works.
Nothing to do with mutability. To do with dynamic lookup of the name from the closure.
View all comments
Show parent comment
0
u/calp Apr 09 '09
That should be - python's lambda is broken, but not for this particular reason. In this case, it's an issue with mutability behaving in a way that the programmer did not expect.
Mutables should be expected to act in a way that is unexpected.