摘要:
定义老师类,把老师的属性:薪资,隐藏起来,然后针对该属性开放访问接口 苑昊老师有多种癖好,把这种癖好隐藏起来,然后对外提供访问接口 而且以后还会苑昊老师培养很多其他的癖好,对外开放修改接口,可以新增癖好,并且需要保证新增的癖好都是字符串类型,否则无法增加成功。 阅读全文
posted @ 2017-04-20 16:32
人到中年万事休
阅读(185)
评论(0)
推荐(0)
摘要:
class A(object): def test(self): print('from A') class B(A): def test(self): print('from B') class C(A): def test(self): print('from C') class D(B,C): def test... 阅读全文
posted @ 2017-04-20 15:15
人到中年万事休
阅读(143)
评论(0)
推荐(0)
浙公网安备 33010602011771号