Re: proxy class and __add__ method

2008-07-30 Thread Gabriel Genellina
En Wed, 30 Jul 2008 14:54:51 -0300, Rhamphoryncus <[EMAIL PROTECTED]> escribió: On Jul 29, 10:23 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: En Tue, 29 Jul 2008 13:13:51 -0300, Magnus Schuster   <[EMAIL PROTECTED]> escribi : > I have written the following small proxy class which I exp

Re: proxy class and __add__ method

2008-07-30 Thread Gabriel Genellina
En Wed, 30 Jul 2008 07:48:45 -0300, Magnus Schuster <[EMAIL PROTECTED]> escribi�: __magic__ methods on new style classes are searched in the class, *not* in the instance. prx_i+1 looks for __add__ in type(prx_i), that is, in the proxy class. With this explanation the behaviour is absolutel

Re: proxy class and __add__ method

2008-07-30 Thread Rhamphoryncus
On Jul 29, 10:23 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 29 Jul 2008 13:13:51 -0300, Magnus Schuster   > <[EMAIL PROTECTED]> escribi : > > > > > Hello, > > I have written the following small proxy class which I expect to pass all > > function calls to the 'original' object: > >

Re: proxy class and __add__ method

2008-07-30 Thread Magnus Schuster
>__magic__ methods on new style classes are searched in the class, *not* in >the instance. prx_i+1 looks for __add__ in type(prx_i), that is, in the >proxy class. With this explanation the behaviour is absolutely clear. Can I find some documentation anywhere containing more background inform

Re: proxy class and __add__ method

2008-07-29 Thread Gabriel Genellina
En Tue, 29 Jul 2008 13:13:51 -0300, Magnus Schuster <[EMAIL PROTECTED]> escribi�: Hello, I have written the following small proxy class which I expect to pass all function calls to the 'original' object: --- BEGIN --- class proxy(object): def __init__( self, subject ): self.__subj