python中多态
A function that can operate on more than one type. If all the operations in a function can be applied to a type, then the function can be applied to a type.
一个函数可以使用在不同的类型数据上称为多态 ,我顿时想到了模版编程,但确实,我看到python把这种叫做polymorphic。
java中多态
具体类针对同一接口有着各自的实现,我们称之为多态,是吧,虽然和教科书上说的不一样,但我理解就是这么回事。
很显然,一对比,就发现两者截然不同,java的这个function中想做的时间可以不一样,可谓变化多端,而python呢,function是不变的,只是支持不同类型的数据。