Changing base class of a big hierarchy
John J. Lee
jjl at pobox.com
Mon Aug 4 13:58:18 EDT 2003
Alex Martelli <aleax at aleax.it> writes:
> John J. Lee wrote:
[...]
> > How would you go about it?
>
> Well, you could:
> -- import the original FtNode (say "import FtNode")
> -- save xxx = sys.modules['FtNode']
> -- patch sys.modules['FtNode'] = yourhackedmodule
> -- do the deed
> -- restore sys.modules['FtNode'] = xxx
[...]
Ick. I don't understand that, and I don't think I want to. :-)
I'll stick with your class-mapping idea, I think.
Thanks all.
John
More information about the Python-list
mailing list