📅  最后修改于: 2022-03-11 14:45:52.945000             🧑  作者: Mango
from types import MethodType
class A(object):
def m(self):
print 'aaa'
a = A()
def new_m(self):
print 'bbb'
a.m = MethodType(new_m, a)