上节回顾,迭代器l = [1,2,3,4] 将其变为迭代器: l.__iter__() 或者iter(l)
装饰器:本质就是函数,为其它函数添加附加功能
原则:1.不修改被修饰函数源代码。 2.不修改被修饰函数的调用方式
装饰器的知识储备
装饰器=高阶函数+函数函数嵌套+闭包