Examples of descriptors?

Raymond Hettinger vze4rx4y at verizon.net
Wed Jun 4 06:48:09 CEST 2003

"Michele Simionato"
> I have a question about the difference between object.__setattr__
> and type.__setattr__, which probably is related to the difference
> bewteen object.__getattribute__ and type.__getattribute__.
 . . .
> My question is: what's the rationale for the change ? It is simply
> a performance hack or there was some subtle bug with the previous
> model ?

Here's the thread that discussed the reason for the change:

In a nutshell, the goal was to avoid that hornet's nest associated
with the ability to set attributes for builtin types.

Raymond Hettinger

More information about the Python-list mailing list