Re: Replacing a built-in method of a module object instance

2009-06-26 Thread Peter Otten
David Hirschfield wrote: > I have a need to replace one of the built-in methods of an arbitrary > instance of a module in some python code I'm writing. > > Specifically, I want to replace the __getattribute__() method of the > module I'm handed with my own __getattribute__() method which will do

Replacing a built-in method of a module object instance

2009-06-26 Thread David Hirschfield
I have a need to replace one of the built-in methods of an arbitrary instance of a module in some python code I'm writing. Specifically, I want to replace the __getattribute__() method of the module I'm handed with my own __getattribute__() method which will do some special work on the attribu