File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,6 +64,25 @@ \section{\module{UserList} ---
6464\class {UserList} class.
6565\end {memberdesc }
6666
67+ \strong {Subclassing requirements:}
68+ Subclasses of \class {UserList} are expect to offer a constructor which
69+ can be called with either no arguments or one argument. List
70+ operations which return a new sequence attempt to create an instance
71+ of the actual implementation class. To do so, it assumes that the
72+ constructor can be called with a single parameter, which is a sequence
73+ object used as a data source.
74+
75+ If a derived class does not wish to comply with this requirement, all
76+ of the special methods supported by this class will need to be
77+ overridden; please consult the sources for information about the
78+ methods which need to be provided in that case.
79+
80+ \versionchanged [Python versions 1.5.2 and 1.6 also required that the
81+ constructor be callable with no parameters, and offer
82+ a mutable \member {data} attribute. Earlier versions
83+ of Python did not attempt to create instances of the
84+ derived class]{2.0}
85+
6786
6887\section {\module {UserString} ---
6988 Class wrapper for string objects }
You can’t perform that action at this time.
0 commit comments