Skip to content

Commit 80dd267

Browse files
Aniketsyvstinner
andauthored
Update Doc/library/warnings.rst
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 4fd4c7a commit 80dd267

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Doc/library/warnings.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -633,9 +633,9 @@ Available Context Managers
633633
- ``category``: the warning category (a subclass of :exc:`Warning`)
634634
- ``filename``: the file name where the warning occurred (str)
635635
- ``lineno``: the line number in the file (int)
636-
- ``file``: the file object used for output (if any)
637-
- ``line``: the line of source code (if available)
638-
- ``source``: the original object that generated the warning (if available)
636+
- ``file``: the file object used for output (if any), or ``None``
637+
- ``line``: the line of source code (if available), or ``None``
638+
- ``source``: the original object that generated the warning (if available), or ``None``
639639

640640
The type of these objects is not specified and may change; only the presence of these attributes is guaranteed.
641641

0 commit comments

Comments
 (0)