摘要: 1、为类或对象动态创建属性或方法 2、__slots__ = ('name','age'),【实例】只能创建指定的属性属性或方法 新式类 3、执行父类的构造函数的不同Father.__init__(self) --经典类super(Son,self).__init__() --新式类4、Person 阅读全文
posted @ 2016-12-24 14:01 RootMe 阅读(1571) 评论(0) 推荐(0) 编辑