Re: multiple inheritance and __getattr__

2008-07-29 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Enrico a écrit : > > Hi there, > > I have the following situation (I tryed to minimize the code to concentrate > > on the issue): > > > class A(object): > > def __getattr__(self, name): > > print 'A.__getatt

Re: multiple inheritance and __getattr__

2008-07-29 Thread Maric Michaud
Le Monday 28 July 2008 16:48:09 Enrico, vous avez écrit : > Hi there, > I have the following situation (I tryed to minimize the code to concentrate > > on the issue): > >>> class A(object): > > def __getattr__(self, name): > print 'A.__getattr__' > if name == 'a': return 1 > raise AttributeE

Re: multiple inheritance and __getattr__

2008-07-29 Thread Enrico
"Bruno Desthuilliers" <[EMAIL PROTECTED]> ha scritto nel messaggio news:[EMAIL PROTECTED] > Indeed. You explicitely raise, so the lookup stops here. You'd need to > explicitely call on superclass instead to have B.__getattr__ called, ie: > > class A(object): > def __getattr__(self, name): >

Re: multiple inheritance and __getattr__

2008-07-28 Thread Bruno Desthuilliers
Enrico a écrit : Hi there, I have the following situation (I tryed to minimize the code to concentrate on the issue): class A(object): def __getattr__(self, name): print 'A.__getattr__' if name == 'a': return 1 raise AttributeError('%s not found in A' % name) class B(object): def __

Re: multiple inheritance and __getattr__

2008-07-28 Thread David C. Ullrich
In article <[EMAIL PROTECTED]>, "Enrico" <[EMAIL PROTECTED]> wrote: > Hi there, > I have the following situation (I tryed to minimize the code to concentrate > on the issue): > > >>> class A(object): > def __getattr__(self, name): > print 'A.__getattr__' > if name == 'a': return 1 > raise

multiple inheritance and __getattr__

2008-07-28 Thread Enrico
Hi there, I have the following situation (I tryed to minimize the code to concentrate on the issue): >>> class A(object): def __getattr__(self, name): print 'A.__getattr__' if name == 'a': return 1 raise AttributeError('%s not found in A' % name) >>> class B(object): def __getattr__(self,