[Python-Dev] Customizing the binding of attributes

Guido van Rossum guido@python.org
Fri, 24 Aug 2001 10:04:43 -0400

> Guido van Rossum wrote:
> > In particular, classic classes can't define __get__ to the effect
> > above.
> Why __get__() and __set__() and not get() and set()?

Because they're mapped to the dispatch slots tp_descr_get and
tp_descr_set.  (Note that PEP 252 has get() and set() in some places,
like the C API section.  This is a mistake.)

--Guido van Rossum (home page: http://www.python.org/~guido/)