File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -892,14 +892,15 @@ \section{Special method names\label{specialnames}}
892892
893893\subsection {Basic customization\label {customization } }
894894
895- \begin {methoddesc }[object]{__init__}{self\optional {, args...}}
896- Called when the instance is created. The arguments are those passed
897- to the class constructor expression. If a base class has an
898- \method {__init__()} method the derived class's \method {__init__()} method must
899- explicitly call it to ensure proper initialization of the base class
900- part of the instance, e.g., \samp {BaseClass.__init__(\var {self},
901- [\var {args}...])}.
902- \indexii {class}{constructor}
895+ \begin {methoddesc }[object]{__init__}{self\optional {, \moreargs }}
896+ Called\indexii {class}{constructor} when the instance is created. The
897+ arguments are those passed to the class constructor expression. If a
898+ base class has an \method {__init__()} method the derived class's
899+ \method {__init__()} method must explicitly call it to ensure proper
900+ initialization of the base class part of the instance; for example:
901+ \samp {BaseClass.__init__(\var {self}, [\var {args}...])}. As a special
902+ contraint on constructors, no value may be returned; doing so will
903+ cause a \exception {TypeError} to be raised at runtime.
903904\end {methoddesc }
904905
905906
You can’t perform that action at this time.
0 commit comments