摘要: resul: B的构造方法A的构造方法{'n': '猫', 'ty': '动物'} 阅读全文
posted @ 2017-02-24 23:26 Erick-LONG 阅读(217) 评论(0) 推荐(0) 编辑
摘要: interface :起到约束作用,我有几个方法,在继承之后必须实现我的方法 阅读全文
posted @ 2017-02-24 08:27 Erick-LONG 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 1 class foo: 2 def f1(self): 3 print('f1') 4 5 class bar: 6 def f1(self): 7 print('f1') 8 9 def func(args): 10 args.f1() 11 12 func(foo()) 13 func(bar()) 阅读全文
posted @ 2017-02-24 08:14 Erick-LONG 阅读(191) 评论(0) 推荐(0) 编辑