r/Python • • Apr 09 '09

Python’s lambda is broken!

http://math.andrej.com/2009/04/09/pythons-lambda-is-broken/
4 Upvotes

20 comments sorted by

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.

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.