摘要: 01.Python 装饰器 方式1:使用函数的方式给函数定义装饰器 from functools import wraps #无参数装饰器示例代码 def simple_decorator(func): @wraps(func) # 使用了@wraps(func)来装饰wrapper函数,这样可保留 阅读全文
posted @ 2025-03-27 17:10 三叶草╮ 阅读(23) 评论(0) 推荐(0)