mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Document warn_explicit().
This commit is contained in:
parent
f1d7b41fa0
commit
56ba72a563
1 changed files with 10 additions and 0 deletions
|
|
@ -161,6 +161,16 @@ rather than to the source of \function{deprecation()} itself (since
|
||||||
the latter would defeat the purpose of the warning message).
|
the latter would defeat the purpose of the warning message).
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
|
\begin{funcdesc}{warn_explicit}{message, category, filename,
|
||||||
|
lineno\optional{, module\optional{, registry}}}
|
||||||
|
This is a low-level interface to the functionality of
|
||||||
|
\function{warn()}, passing in explicitly the message, category,
|
||||||
|
filename and line number, and optionally the module name and the
|
||||||
|
registry (which should be the \code{__warningregistry__} dictionary of
|
||||||
|
the module). The module name defaults to the filename with \code{.py}
|
||||||
|
stripped; if no registry is passed, the warning is never suppressed.
|
||||||
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{showwarning}{message, category, filename,
|
\begin{funcdesc}{showwarning}{message, category, filename,
|
||||||
lineno\optional{, file}}
|
lineno\optional{, file}}
|
||||||
Write a warning to a file. The default implementation calls
|
Write a warning to a file. The default implementation calls
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue