mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Document GetoptError and label error an alias.
This commit is contained in:
parent
80c33e562d
commit
76e6da38c0
1 changed files with 9 additions and 2 deletions
|
@ -41,12 +41,19 @@ found, thus allowing multiple occurrences. Long and short options may
|
||||||
be mixed.
|
be mixed.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{excdesc}{error}
|
\begin{excdesc}{GetoptError}
|
||||||
This is raised when an unrecognized option is found in the argument
|
This is raised when an unrecognized option is found in the argument
|
||||||
list or when an option requiring an argument is given none.
|
list or when an option requiring an argument is given none.
|
||||||
The argument to the exception is a string indicating the cause of the
|
The argument to the exception is a string indicating the cause of the
|
||||||
error. For long options, an argument given to an option which does
|
error. For long options, an argument given to an option which does
|
||||||
not require one will also cause this exception to be raised.
|
not require one will also cause this exception to be raised. The
|
||||||
|
attributes \member{msg} and \member{opt} give the error message and
|
||||||
|
related option; if there is no specific option to which the exception
|
||||||
|
relates, \member{opt} is an empty string.
|
||||||
|
\end{excdesc}
|
||||||
|
|
||||||
|
\begin{excdesc}{error}
|
||||||
|
Alias for \exception{GetoptError}; for backward compatibility.
|
||||||
\end{excdesc}
|
\end{excdesc}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue