摘要: 给类/实例动态绑定方法 from types import MethodType class Student(object): pass def set_age(self, age): self.age = age def set_score(self, score): self.score = s 阅读全文
posted @ 2019-05-18 22:04 stacy_hu 阅读(151) 评论(0) 推荐(0) 编辑