1
1989lzhh
here is code
def make():
def jit(sig):
def wrap(function):
sig=sig[0] # unbound local error, if change to sig='' would be just fine
return function
return wrap
return jit
jit=make()
@jit('')
def f():
pass
It is strange that the interpreter complain about unbound local error.
please give me some suggestion, thanks!
Ps: I am using python 2.7
Liu Zhenhai
·¢×ÔÎÒµÄ iPhone
def make():
def jit(sig):
def wrap(function):
sig=sig[0] # unbound local error, if change to sig='' would be just fine
return function
return wrap
return jit
jit=make()
@jit('')
def f():
pass
It is strange that the interpreter complain about unbound local error.
please give me some suggestion, thanks!
Ps: I am using python 2.7
Liu Zhenhai
·¢×ÔÎÒµÄ iPhone