Skip to content

Commit 705f145

Browse files
authored
Doc: Add a link to tutorial page from open() doc (GH-21737)
Adds a link to the "Reading and Writing Files" page so users can more easily discover how file handles are handled with the `with` context manager vs without it.
1 parent 102b498 commit 705f145

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Doc/library/functions.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,8 @@ are always available. They are listed here in alphabetical order.
10551055
.. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
10561056

10571057
Open *file* and return a corresponding :term:`file object`. If the file
1058-
cannot be opened, an :exc:`OSError` is raised.
1058+
cannot be opened, an :exc:`OSError` is raised. See
1059+
:ref:`tut-files` for more examples of how to use this function.
10591060

10601061
*file* is a :term:`path-like object` giving the pathname (absolute or
10611062
relative to the current working directory) of the file to be opened or an

0 commit comments

Comments
 (0)