spir wrote:
Hello Eike!
Eike Welk dixit:
Well, this is certainly not specific to closures.
i = 0
def f():
i = i+1
print i
f()
==> UnboundLocalError
Imo, in this case, "i = i+1" is a kind of "paradoxal injonction" (lol! not sure
of the exact idiom in english). You tell python both t
Hello Eike!
Eike Welk dixit:
> Hello Spir!
>
> On Monday 30 November 2009, spir wrote:
> > which seems to indicate python really embeds "symbolic references"
> > (*) to outer *variables*, when creating a closure for g0. Not
> > "pointer references" (**), otherwise the replacement of x would not
Hello Spir!
On Monday 30 November 2009, spir wrote:
> which seems to indicate python really embeds "symbolic references"
> (*) to outer *variables*, when creating a closure for g0. Not
> "pointer references" (**), otherwise the replacement of x would not
> be seen by the closure --like in the case