[Python-checkins] CVS: python/dist/src/Doc/lib libuserdict.tex,1.16,1.17

Fred L. Drake python-dev@python.org
Fri, 6 Oct 2000 13:04:52 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv23626

Modified Files:
	libuserdict.tex 
Log Message:

Add notes on the requirements for subclasses.

This closes SourceForge bug #115928.


Index: libuserdict.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libuserdict.tex,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** libuserdict.tex	2000/09/09 03:23:50	1.16
--- libuserdict.tex	2000/10/06 20:04:48	1.17
***************
*** 65,68 ****
--- 65,87 ----
  \end{memberdesc}
  
+ \strong{Subclassing requirements:}
+ Subclasses of \class{UserList} are expect to offer a constructor which
+ can be called with either no arguments or one argument.  List
+ operations which return a new sequence attempt to create an instance
+ of the actual implementation class.  To do so, it assumes that the
+ constructor can be called with a single parameter, which is a sequence
+ object used as a data source.
+ 
+ If a derived class does not wish to comply with this requirement, all
+ of the special methods supported by this class will need to be
+ overridden; please consult the sources for information about the
+ methods which need to be provided in that case.
+ 
+ \versionchanged[Python versions 1.5.2 and 1.6 also required that the
+                 constructor be callable with no parameters, and offer
+                 a mutable \member{data} attribute.  Earlier versions
+                 of Python did not attempt to create instances of the
+                 derived class]{2.0}
+ 
  
  \section{\module{UserString} ---