heaven123

2019年8月7日

python 装饰器

摘要: #装饰器,就是装饰函数的意思#在不改变原来的调用方式、代码的情况下,给函数增加新功能# ben=holly#函数即变量# ben('holly')def timer(func): def add(): print('aaa') func() return add@timer#语法糖 holly=ti 阅读全文

posted @ 2019-08-07 19:35 heaven123 阅读(212) 评论(0) 推荐(0) 编辑

导航