[Python-checkins] python/dist/src/Doc/tut tut.tex,1.156.4.1.2.8,1.156.4.1.2.9

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Wed, 14 Aug 2002 08:27:21 -0700


Update of /cvsroot/python/python/dist/src/Doc/tut
In directory usw-pr-cvs1:/tmp/cvs-serv17404

Modified Files:
      Tag: release22-maint
	tut.tex 
Log Message:
Remove a broken example of extreme backward compatibility; it is
simply not relevant any more.
Closes SF bug #595032.


Index: tut.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tut/tut.tex,v
retrieving revision 1.156.4.1.2.8
retrieving revision 1.156.4.1.2.9
diff -C2 -d -r1.156.4.1.2.8 -r1.156.4.1.2.9
*** tut.tex	7 Aug 2002 20:23:00 -0000	1.156.4.1.2.8
--- tut.tex	14 Aug 2002 15:27:19 -0000	1.156.4.1.2.9
***************
*** 3976,4000 ****
  when referencing \code{__dict__} directly.
  
- Here's an example of a class that implements its own
- \method{__getattr__()} and \method{__setattr__()} methods and stores
- all attributes in a private variable, in a way that works in all
- versions of Python, including those available before this feature was
- added:
- 
- \begin{verbatim}
- class VirtualAttributes:
-     __vdict = None
-     __vdict_name = locals().keys()[0]
-      
-     def __init__(self):
-         self.__dict__[self.__vdict_name] = {}
-     
-     def __getattr__(self, name):
-         return self.__vdict[name]
-     
-     def __setattr__(self, name, value):
-         self.__vdict[name] = value
- \end{verbatim}
- 
  
  \section{Odds and Ends \label{odds}}
--- 3976,3979 ----