摘要: python装饰器就是用于拓展原来函数功能的一种函数,这个函数的特殊之处在于它的返回值也是一个函数,使用python装饰器的好处就是在不用更改原函数的代码前提下给函数增加新的功能。 def test(a_func): def test_old(): print("I am 开始") a_func() 阅读全文
posted @ 2021-03-17 15:46 皮子成 阅读(73) 评论(0) 推荐(0)