实例如下所示: class Person(): def __init__(self, name): self.name = name def print_name(self): print(self.name) p = Person('Li') import types p.print_name = types.MethodType(print_name, p) # 绑定函数到对象 p.print_name() @staticmethod def print_abc(): print('abc') Person.print_abc = print_abc Person.print_