Override a method in another module

Martin v. Loewis martin at v.loewis.de
Tue Oct 1 18:59:02 EDT 2002


Bruce Edge <edgebruce at yahoo.com> writes:

> What's the basic syntax to override (redefine) a function in another
> module at runtime?
> 
> Say, I have module M, class C, method F, and I want to redifine method F.

def F(self):pass
M.C.F = F

HTH,
Martin



More information about the Python-list mailing list