On Sat, 07 Jun 2014 19:17:23 +0800, 1989lzhh wrote:
> here is code
> def make():
> def jit(sig):
> def wrap(function):
> sig=sig # unbound local error
You are saying:
"sig is a local variable. Assign sig to the value of sig."
But what is sig? You've said it is a local variable, and at this point it
doesn't have a value yet.
Lua allows you to do this:
sig = sig
will look up a global sig and assign it to the local sig first, but that
can be confusing and Python doesn't do that.