Python 装饰器的使用方法 小旺不正经 2021-12-21 134 阅读1分钟 Python 装饰器的使用方法 from functools import wraps def a(d): # 接收函数b @wraps(d) def c(): print("hello") # 使用函数b d() # 必须有返回值 return c @a def b(): print("001") b()