比如这个代码
class Bird:
#鸟有翅膀
def isWing(self):
print("鸟有翅膀")
#鸟会飞
def fly(self):
print("鸟会飞")
class Ostrich(Bird):
# 重写 Bird 类的 fly()方法
def fly(self):
print("鸵鸟不会飞")
# 创建 Ostrich 对象
ostrich = Ostrich()
#调用 Ostrich 类中重写的 fly() 类方法
ostrich.fly()
父类 bird 中有一个 fly()方法,子类 Ostrich 继承了 bird 类, 子类 Ostrich 中的 fly()方法会覆盖父类 bird 中的 fly()方法,这个如何避免, 我想让子类 Ostrich 中的 fly()方法不覆盖父类 bird 中的 fly()方法,
我不想修改父类的内容, 因为父类被很多地方调用了