參考: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()
***調用funB不能加括號,加了funB()報錯"Python TypeError: ‘NoneType‘ object is not callable"
def funA(fun):
temp = fun()
return temp
@funA
def funB():
print ('B')
return 1
pick want Now , The developme