Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f981617

Browse files
committed
"level" keyword argument in example should be "stacklevel".
This closes SF bug #517684.
1 parent 57fd45e commit f981617

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Doc/lib/libwarnings.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ \subsection{Available Functions \label{warning-functions}}
153153

154154
\begin{verbatim}
155155
def deprecation(message):
156-
warnings.warn(message, DeprecationWarning, level=2)
156+
warnings.warn(message, DeprecationWarning, stacklevel=2)
157157
\end{verbatim}
158158

159159
This makes the warning refer to \function{deprecation()}'s caller,

0 commit comments

Comments
 (0)