摘要: 1.绑定方法 给所有实例都绑定方法,可以给class绑定方法: >>> def set_score(self, score): ... self.score = score ... >>> Student.set_score = set_score 给class绑定方法后,所有实例均可调用。 2.使 阅读全文
posted @ 2018-06-08 10:49 QianweiZ 阅读(143) 评论(0) 推荐(0) 编辑