[Python-Dev] Customizing the binding of attributes (original) (raw)

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/)