Reference resources :https://blog.csdn.net/qq_34914551/article/details/107358768
def funA(fun):
def warp():
temp = fun()
return temp
return warp
@funA
def funB():
print ('B')
return 1
funB()
def funA(fun):
return fun
@funA
def funB():
print ('B')
return 1
funB()
*** call funB No parentheses , added funB() Report errors "Python TypeError: ‘NoneType‘ object is not callable"
def funA(fun):
temp = fun()
return temp
@funA
def funB():
print ('B')
return 1