python——装饰器之二层与三层的区别

论如下三种装饰器写法的区别web @json_output #二层 @json_output() #三层 @json_output(indent=10) #三层(与第二个同样) # encoding=utf-8 import json # deco_func 与 indent不会同时存在 def json_output(deco_func=None, indent=None): prin
相关文章
相关标签/搜索