class Animal(object): @staticmethod #定义静态方法,eat 不要调用类的属性,也不要调用对象的属性 def eat(): print("eat") # 静态方法,不需要创建实例对象 Animal.eat()