mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
Update documentation to reflect the shift to NetrcParseError instead of
SyntaxError.
This commit is contained in:
parent
ec6ec90dd2
commit
990b0fec1a
1 changed files with 10 additions and 2 deletions
|
|
@ -18,10 +18,18 @@ A \class{netrc} instance or subclass instance encapsulates data from
|
||||||
a netrc file. The initialization argument, if present, specifies the
|
a netrc file. The initialization argument, if present, specifies the
|
||||||
file to parse. If no argument is given, the file \file{.netrc} in the
|
file to parse. If no argument is given, the file \file{.netrc} in the
|
||||||
user's home directory will be read. Parse errors will raise
|
user's home directory will be read. Parse errors will raise
|
||||||
\exception{SyntaxError} with diagnostic information including the file
|
\exception{NetrcParseError} with diagnostic information including the
|
||||||
name, line number, and terminating token.
|
file name, line number, and terminating token.
|
||||||
\end{classdesc}
|
\end{classdesc}
|
||||||
|
|
||||||
|
\begin{excdesc}{NetrcParseError}
|
||||||
|
Exception raised by the \class{netrc} class when syntactical errors
|
||||||
|
are encountered in source text. Instances of this exception provide
|
||||||
|
three interesting attributes: \member{msg} is a textual explanation
|
||||||
|
of the error, \member{filename} is the name of the source file, and
|
||||||
|
\member{lineno} gives the line number on which the error was found.
|
||||||
|
\end{excdesc}
|
||||||
|
|
||||||
|
|
||||||
\subsection{netrc Objects \label{netrc-objects}}
|
\subsection{netrc Objects \label{netrc-objects}}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue