From: news at dorb.com (Darrell)
Date: Thu, 8 Apr 1999 17:34:52 -0400
Subject: Chaning instance methods
References: <tx3soadh4jj.fsf@hog.ldgo.columbia.edu> <370C2904.A6F4BD54@inrialpes.fr>
Message-ID: <Sa9P2.1453$YU1.3072@newsr2.twcny.rr.com>
X-UID: 1168                                                  

> To make a long story short, what you're trying to do is not very cool,
> so perhaps you don't get truly cool answers, but still, you can do it
> in Python. Fortunately, what you're asking here is not common practice,
> I hope!

Is this a truly flawed design pattern ?
I have done this for a module  to replace a function with out changing the
module its self. Because I didn't control that module. Also for a class once
to allow a runtime XML type script to replace a method. Both of these can be
tricky to debug because you tend to forget what's happening. Yet a better
solution doesn't come to mind.

Possibly the module problem could be solved by creating another module and
"from XXX import *" then add my replacement function.

Darrell Gallion






