python Python计时装饰器 Python计时装饰器,可用于给函数运行时间计时,进而进行性能优化 from functools import wraps import time def timing(func): """ 计时装饰器 """ @wraps(func) def wrapper(*args, **kwargs): """ 装饰函数 """ start