Python全棧學習筆記day 12:裝飾器進階

一、帶參數的裝飾器 一個裝飾器同時裝飾多個函數: def timer_out(): def timer(func): def inner(*args,**kwargs): print('裝飾函數前') ret = func(*args,**kwargs) print('裝飾函數後')
相關文章
相關標籤/搜索