python3:面向对象(多态和继承、方法重载及模块)

一、多态 同一个方法在不一样的类中最终呈现出不一样的效果,即为多态。python class Triangle: def __init__(self,width,height): self.width = width self.height = height def getArea(self): area=self.width* s
相关文章
相关标签/搜索