函数装饰器。
使用@
程序实例:
import time
def my_decorator(func):
def wrapper():
print("wrapper函数开始")
start_time = time.perf_counter()
func(
函数装饰器。
使用@
程序实例:
import time
def my_decorator(func):
def wrapper():
print("wrapper函数开始")
start_time = time.perf_counter()
func(