python07-高级特性

面向对象的编程高级 1.为对象动态绑定属性和方法 2.为对象动态绑定属性和方法 3.使用__slots__限定绑定属性 4.使用property装饰器 5.多重继承 6.repr=__str__方法 7.用__iter__方法实现forin循环 List()函数可以转换为列表 yield 表示停 for in循环和next()用做生成器, 生成器:表达式、对象、函数
相关文章
相关标签/搜索