mirror of https://github.com/python/cpython.git
Minor changes. Explain that for class exceptions, use excdesc but do not
document the constructor parameters. Need a better way, but this will do for now.
This commit is contained in:
parent
e3889da076
commit
e1a85f5e4a
|
@ -84,7 +84,7 @@ The \module{spam} module defines the following functions:
|
||||||
|
|
||||||
\begin{funcdesc}{open}{filename\optional{, mode\optional{, buffersize}}}
|
\begin{funcdesc}{open}{filename\optional{, mode\optional{, buffersize}}}
|
||||||
Open the file \var{filename} as a can of Spam. The optional
|
Open the file \var{filename} as a can of Spam. The optional
|
||||||
\var{mode} and \var{buffersize} arguments specify the read-write mode
|
\var{mode} and \var{buffersize} arguments specify the read/write mode
|
||||||
(\code{'r'} (default) or \code{'w'}) and the buffer size (default:
|
(\code{'r'} (default) or \code{'w'}) and the buffer size (default:
|
||||||
system dependent).
|
system dependent).
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
@ -101,7 +101,9 @@ once the \function{open()} function has been called.
|
||||||
|
|
||||||
% --- 3.3. ---
|
% --- 3.3. ---
|
||||||
% Exceptions are described using a ``excdesc'' block. This has only
|
% Exceptions are described using a ``excdesc'' block. This has only
|
||||||
% one parameter: the exception name.
|
% one parameter: the exception name. Exceptions defined as classes in
|
||||||
|
% the source code should be documented using this environment, but
|
||||||
|
% constructor parameters must be ommitted.
|
||||||
|
|
||||||
\begin{excdesc}{error}
|
\begin{excdesc}{error}
|
||||||
Exception raised when an operation fails for a Spam specific reason.
|
Exception raised when an operation fails for a Spam specific reason.
|
||||||
|
@ -129,8 +131,7 @@ failure.
|
||||||
% an example giving the flavor of the module may be given before the
|
% an example giving the flavor of the module may be given before the
|
||||||
% detailed list of functions.)
|
% detailed list of functions.)
|
||||||
|
|
||||||
\subsection{Example}
|
\subsection{Example \label{spam-example}}
|
||||||
\nodename{Spam Example}
|
|
||||||
|
|
||||||
The following example demonstrates how to open a can of spam using the
|
The following example demonstrates how to open a can of spam using the
|
||||||
\module{spam} module.
|
\module{spam} module.
|
||||||
|
|
Loading…
Reference in New Issue