跳转底部

随笔分类 -  面向对象

python 面向对象高级编程
摘要:#**********使用__slots__限制实例属性********** class Student(object): pass def set_age(self,age): self.age = age from types import MethodType s = Student() s.set_age = MethodType(set_age,s) #给实例绑定一... 阅读全文

posted @ 2018-06-20 20:04 afly666 阅读(207) 评论(0) 推荐(0)

python 面向对象编程 类和实例
摘要:# 在类的方法中再定义函数,然后实例类对象,引用这个方法 阅读全文

posted @ 2018-06-19 19:27 afly666 阅读(459) 评论(0) 推荐(0)

python 模块
摘要:模块py文件 引用模块 阅读全文

posted @ 2018-06-19 18:05 afly666 阅读(253) 评论(0) 推荐(0)

导航

回到顶部