1.鸭子类型和多态
多态的概念是应用于Java和C#这一类强类型语言中,而Python崇尚"鸭子类型"
所谓多态:定义时的类型和运行时的类型不一样,此时就成为多态。...高级/第一讲/demo1.py", line 23, in
animal.info()
TypeError: info() missing 1 required positional...mro 算法 在Python2.3之后,Python采用了C3算法
?...高级/第一讲/demo6.py", line 15, in
result = IntTuple([2,-2,'zs',['x','y',4]])
File "G:/pythonlianxi.../spython/logic/python高级/第一讲/demo6.py", line 12, in init
super().init(f)
TypeError: object.init() takes