装饰器
摘要:一、什么是python装饰器 python装饰器(函数):装饰函数或者类,对函数或类进行功能的扩展 标记符号:@函数名称 python装饰器:函数装饰器和类装饰器 装饰器的使用场景: 鉴权 日志 pytest unittest二、装饰函数 #装饰器函数的应用场景 def runTime(func):
阅读全文
posted @ 2022-01-14 00:31
posted @ 2022-01-14 00:31
posted @ 2022-01-12 15:08
posted @ 2022-01-03 15:53
posted @ 2022-01-03 15:46