摘要:
# 多个函数被装饰后 只要有一次认证成功 之后就不需要认证 is_auth = {'is_login':False} def login_auton(func_name): def inner(*args, **kwargs): if is_auth.get('is_login'): res = f 阅读全文
posted @ 2022-03-21 20:22
末笙
阅读(191)
评论(0)
推荐(0)
摘要:
多层装饰器 '''语法糖会把紧挨着的被装饰对象的名字当作参数自动传入装饰器函数里面''' # 判断多个语法糖装饰器函数运行顺序 def outter1(func1): print('加载了outter1') def wrapper1(*args, **kwargs): print('执行了wrapp 阅读全文
posted @ 2022-03-21 18:33
末笙
阅读(41)
评论(0)
推荐(0)

浙公网安备 33010602011771号