摘要: '''''示例1: 使用语法糖@来装饰函数,相当于“myfunc = fun1(myfunc)”但发现新函数只在第一次被调用,且原函数多调用了一次'''def fun1(func): print("before") func() #第一次调用 print("after") # def func(): 阅读全文
posted @ 2017-11-17 22:26 窃语 阅读(293) 评论(0) 推荐(0)