[Python-checkins] CVS: python/dist/src/Objects typeobject.c,2.36,2.37

Guido van Rossum gvanrossum@users.sourceforge.net
Thu, 16 Aug 2001 08:42:51 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv29137

Modified Files:
	typeobject.c 
Log Message:
I should add that the previous checkin also added a slight
optimization for dynamic classes.  If __getattr__ is not found as an
attribute on the type, slot_tp_getattro replaces itself with
PyObject_GenericGetAttr.  This means you can't add a __getattr__
method to a class after the fact -- but you can still *change* a
__getattr__ method into a different one.

(A similar restriction exists for classic classes.)



Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.36
retrieving revision 2.37
diff -C2 -d -r2.36 -r2.37