Override a method in another module

Bruce Edge edgebruce at yahoo.com
Wed Oct 2 00:34:07 CEST 2002

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.

setattr( M.C.F, eval("def F(self): pass"))  doesn't exactly work.....

Thanks, Bruce.

More information about the Python-list mailing list