摘要: 装饰器:修改(增添)函数功能的函数 @函数 1 def home(func): # 这就是一个装饰器 2 def inner(arg): 3 print('hello,') 4 func(arg) 5 return inner 6 @home # 装饰器关键字 7 def eye(name): 8 阅读全文
posted @ 2018-09-07 19:47 yin_zhaozhao 阅读(174) 评论(0) 推荐(0) 编辑