Problem understanding how closures work

Tom Plunket tomas at fancy.org
Tue Dec 12 18:22:42 EST 2006


Rob Williscroft wrote:

> "name" in the above code is bound to a an entry in "CreateTests1"'s 
> locals, and ExCall has a (hidden) reference to that locals, so 
> by the time ExCall is finally called the value associated 
> with "name" has been replaced by (count - 1).

Ah, I got it.  Thanks.  Thanks too to Gabriel.


-tom!



More information about the Python-list mailing list