1. # 提高代码的兼容性 让代码的调度更加灵活
    2. class Dog:
    3. def shout(self):
    4. print("汪汪汪")
    5. class Cat:
    6. def shout(self):
    7. print("喵喵喵")
    8. def shout(obj):
    9. obj.shout()
    10. cat = Cat()
    11. dog = Dog()
    12. shout(cat)
    13. shout(dog)