Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Doc/library/warnings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,10 @@ Available Context Managers
A context manager that copies and, upon exit, restores the warnings filter
and the :func:`showwarning` function.
If the *record* argument is :const:`False` (the default) the context manager
returns :class:`None` on entry. If *record* is :const:`True`, a list is
returned that is progressively populated with objects as seen by a custom
:func:`showwarning` function (which also suppresses output to ``sys.stdout``).
returns :class:`None` on entry. If *record* is :const:`True`, the default
warning stream is intercepted and a list is returned that is progressively
populated with objects as seen by a custom
:func:`showwarning` function (which also suppresses output to ``sys.stderr`` and other streams).
Each object in the list has attributes with the same names as the arguments to
:func:`showwarning`.

Expand Down
Loading