# 提高代码的兼容性 让代码的调度更加灵活class Dog: def shout(self): print("汪汪汪")class Cat: def shout(self): print("喵喵喵")def shout(obj): obj.shout()cat = Cat()dog = Dog()shout(cat)shout(dog)