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

proxy class and __add__ method

2008-07-29 Thread Magnus Schuster
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.__subject = subject def __getattr__( self, name ): return getattr( self.__subjec