python/dist/src/Doc/ref ref7.tex,1.36,1.37
Update of /cvsroot/python/python/dist/src/Doc/ref In directory sc8-pr-cvs1:/tmp/cvs-serv19643 Modified Files: ref7.tex Log Message: - update to reflect that base classes can be class types as well as "classic" class objects [partially fixes SF bug #453684] - add note that new-style classes can use descriptors to implement instance variables in different ways Index: ref7.tex =================================================================== RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref7.tex,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** ref7.tex 12 Aug 2003 00:01:17 -0000 1.36 --- ref7.tex 24 Sep 2003 04:11:47 -0000 1.37 *************** *** 420,424 **** A class definition is an executable statement. It first evaluates the inheritance list, if present. Each item in the inheritance list ! should evaluate to a class object. The class's suite is then executed in a new execution frame (see section~\ref{naming}), using a newly created local namespace and the original global namespace. --- 420,425 ---- A class definition is an executable statement. It first evaluates the inheritance list, if present. Each item in the inheritance list ! should evaluate to a class object or class type which allows ! subclassing. The class's suite is then executed in a new execution frame (see section~\ref{naming}), using a newly created local namespace and the original global namespace. *************** *** 434,438 **** \indexii{execution}{frame} ! \strong{Programmer's note:} variables defined in the class definition are class variables; they are shared by all instances. To define instance variables, they must be given a value in the --- 435,439 ---- \indexii{execution}{frame} ! \strong{Programmer's note:} Variables defined in the class definition are class variables; they are shared by all instances. To define instance variables, they must be given a value in the *************** *** 442,443 **** --- 443,446 ---- with the same name when accessed in this way. Class variables with immutable values can be used as defaults for instance variables. + For new-style classes, descriptors can be used to create instance + variables with different implementation details.
participants (1)
-
fdrake@users.sourceforge.net