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 705f145565)

Co-authored-by: Benjamin Kane <bbkane@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2020-08-07 20:05:04 -07:00 committed by GitHub
parent 398dabb681
commit de5de413e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -1035,7 +1035,8 @@ are always available. They are listed here in alphabetical order.
.. function:: open(file, mode='r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True, opener=None)
Open *file* and return a corresponding :term:`file object`. If the file
cannot be opened, an :exc:`OSError` is raised.
cannot be opened, an :exc:`OSError` is raised. See
:ref:`tut-files` for more examples of how to use this function.
*file* is a :term:`path-like object` giving the pathname (absolute or
relative to the current working directory) of the file to be opened or an