According to wikipedia, 'a closure is a first-class function with free variables that are bound in the lexical environment. Such a function is said to be "closed over" its free variables.' An example should make it clearer.
adderis a so-called factory function. We exercise it like so:
So the question on SO was, "why does the nested function" (func, assigned to f) "remember the first value" of n?
One answer is: because that's the rule!
f.func_closureis a tuple. The first item is a "cell" that contains the same
intobject passed to
More about function objects here