mirror of
https://github.com/python/cpython.git
synced 2024-11-24 18:34:43 +08:00
"level" keyword argument in example should be "stacklevel".
This closes SF bug #517684.
This commit is contained in:
parent
57fd45ea07
commit
f981617645
@ -153,7 +153,7 @@ this:
|
||||
|
||||
\begin{verbatim}
|
||||
def deprecation(message):
|
||||
warnings.warn(message, DeprecationWarning, level=2)
|
||||
warnings.warn(message, DeprecationWarning, stacklevel=2)
|
||||
\end{verbatim}
|
||||
|
||||
This makes the warning refer to \function{deprecation()}'s caller,
|
||||
|
Loading…
Reference in New Issue
Block a user