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. Than
On 12 dic, 17:23, Tom Plunket <[EMAIL PROTECTED]> wrote:
> ...at least, I think that I'm having a problem understanding the way
> closures work.
>
> I'm trying to define a function for an object which will take certain
> objects from the parent scope at the time that function is defined.
> def Cr
Tom Plunket wrote in news:[EMAIL PROTECTED] in
comp.lang.python:
> ...at least, I think that I'm having a problem understanding the way
> closures work.
>
> I'm trying to define a function for an object which will take certain
> objects from the parent scope at the time that function is defined.
...at least, I think that I'm having a problem understanding the way
closures work.
I'm trying to define a function for an object which will take certain
objects from the parent scope at the time that function is defined.
For some reason, if I do this function definition in a loop, the
locals give