[Python-checkins] CVS: python/dist/src/Doc/ref ref3.tex,1.69,1.70
Fred L. Drake
fdrake@users.sourceforge.net
Thu, 02 Aug 2001 08:53:07 -0700
Update of /cvsroot/python/python/dist/src/Doc/ref
In directory usw-pr-cvs1:/tmp/cvs-serv9145/ref
Modified Files:
ref3.tex
Log Message:
Explain that __init__() methods do not get to return values.
Index: ref3.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/ref/ref3.tex,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -d -r1.69 -r1.70
*** ref3.tex 2001/07/14 02:12:27 1.69
--- ref3.tex 2001/08/02 15:53:05 1.70
***************
*** 893,904 ****
\subsection{Basic customization\label{customization}}
! \begin{methoddesc}[object]{__init__}{self\optional{, args...}}
! Called when the instance is created. The arguments are those passed
! to the class constructor expression. If a base class has an
! \method{__init__()} method the derived class's \method{__init__()} method must
! explicitly call it to ensure proper initialization of the base class
! part of the instance, e.g., \samp{BaseClass.__init__(\var{self},
! [\var{args}...])}.
! \indexii{class}{constructor}
\end{methoddesc}
--- 893,905 ----
\subsection{Basic customization\label{customization}}
! \begin{methoddesc}[object]{__init__}{self\optional{, \moreargs}}
! Called\indexii{class}{constructor} when the instance is created. The
! arguments are those passed to the class constructor expression. If a
! base class has an \method{__init__()} method the derived class's
! \method{__init__()} method must explicitly call it to ensure proper
! initialization of the base class part of the instance; for example:
! \samp{BaseClass.__init__(\var{self}, [\var{args}...])}. As a special
! contraint on constructors, no value may be returned; doing so will
! cause a \exception{TypeError} to be raised at runtime.
\end{methoddesc}