Cloudthunder wrote:
> Sorry, I don't understand, how does this solve my problem?
>
__getattr__ and __setattr__ allow you to set up dynamic delegation e.g.,
class Foo(object):
def __init__(self, **kw):
self.__dict__.update(kw)
def methFoo(self, x):
return "Foo.methFoo(%
Sorry, I don't understand, how does this solve my problem?On 4/3/06, Jesus Rivero - (Neurogeek) <[EMAIL PROTECTED]
> wrote:-BEGIN PGP SIGNED MESSAGE-Hash: SHA1>>> help(getattr) help(setattr)
Regards, Jesus Rivero - (Neurogeek)Cloudthunder wrote:> Question: how do I merge two objects? I wou
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
>>> help(getattr) help(setattr)
Regards,
Jesus Rivero - (Neurogeek)
Cloudthunder wrote:
> Question: how do I merge two objects? I would like to be able to
> have an instance of Foo and an instance of Boo and then be able to
> add them together an
Question: how do I merge two objects? I would like to be able to have an instance of Foo and an instance of Boo and then be able to add them together and create a new object that has the methods and properties of both objects. I am going to be doing a lot of this and I don't want to have to dynamic