Re: Class attributes, instances and metaclass __getattribute__

2006-08-08 Thread Pedro Werneck
On 8 Aug 2006 07:24:54 -0700 "Ziga Seilnacht" <[EMAIL PROTECTED]> wrote: > [snip] > > Well... I'm not talking about metaclass attributes... that's > > perfectly consistent, agreed. > > > > I'm saying that when the class implements a custom __getattribute__, > > when you try to access the instance

Re: Class attributes, instances and metaclass __getattribute__

2006-08-08 Thread Ziga Seilnacht
Pedro Werneck wrote: > Hi [snip] > Well... I'm not talking about metaclass attributes... that's perfectly > consistent, agreed. > > I'm saying that when the class implements a custom __getattribute__, > when you try to access the instance attributes from itself, it uses it. > But if the class is a

Re: Class attributes, instances and metaclass __getattribute__

2006-08-08 Thread Pedro Werneck
Hi On 8 Aug 2006 00:10:39 -0700 "Michele Simionato" <[EMAIL PROTECTED]> wrote: > To me, it seems consistent. As said in > http://www-128.ibm.com/developerworks/linux/library/l-pymeta2/ > > """The availability of metaclass attributes is not transitive; in > other words, the attributes of a metac

Re: Class attributes, instances and metaclass __getattribute__

2006-08-08 Thread Michele Simionato
Pedro Werneck wrote: > When I access a class attribute, on a class with a custom metaclass with > a __getattribute__ method, the method is used when acessing some > attribute directly with the class object, but not when you do it from > the instance. > > > >>> class M(type): > ... def __getatt

Class attributes, instances and metaclass __getattribute__

2006-08-07 Thread Pedro Werneck
Hi all I noticed something strange here while explaining decorators to someone. Not any real use code, but I think it's worth mentioning. When I access a class attribute, on a class with a custom metaclass with a __getattribute__ method, the method is used when acessing some attribute directly