News for hackers. Stuff that matters.
Re:Lambdas and Functions in Python by abecedarius on Saturday June 16, 2018 @09:32PM (#17330464)
All right, I looked into this using repl.it. The __closure__ field is not actually a closure in the usual sense of the word -- it's the environment of the closure, and fs[0] and fs[1] are expected to share the same environment. If you look at the identities of fs[0] and fs[1] themselves, they are different. It's as I said originally, just with a confusing name for the environment field.

There are no comments on this comment yet.