Hrvoje Niksic a écrit :
(snip)
> As others explained, descriptors are called for descriptors found in
> class attributes, not in ones in instance attributes.  
(snip)

> However, if you know what you're doing, you can simply customize your
> class's __getattribute__ to do what *you* want for your objects.

<op>
But bear in mind that, beside possible unwanted side-effectn, you'll get 
  a non-negligible performance hit - __getattribute__ being, as the name 
implies, invoked on each and every attribute lookup.

FWIW, I tried this approach once, and quickly came back to a simpler 
solution.

</op>
(snip code)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to