Skip to content

Commit de5de41

Browse files
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. (cherry picked from commit 705f145) Co-authored-by: Benjamin Kane <bbkane@users.noreply.github.com>
1 parent 398dabb commit de5de41

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
@@ -1035,7 +1035,8 @@ are always available. They are listed here in alphabetical order.
10351035
.. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
10361036

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

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

0 commit comments

Comments
 (0)