diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2020-08-08 03:03:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-08 03:03:56 (GMT) |
commit | deea701b7f9922e0991b129e84644c2d6b0995ae (patch) | |
tree | c16cce56ca7ad5da69acd4066e493b05ccac93c9 /Doc | |
parent | 70e9243a55be9c32b41f2149cdfa3957f96f8471 (diff) | |
download | cpython-deea701b7f9922e0991b129e84644c2d6b0995ae.zip cpython-deea701b7f9922e0991b129e84644c2d6b0995ae.tar.gz cpython-deea701b7f9922e0991b129e84644c2d6b0995ae.tar.bz2 |
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 705f14556545699ab615ec98f707b438f9603767)
Co-authored-by: Benjamin Kane <bbkane@users.noreply.github.com>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/functions.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index e9c92f7..d0f6072 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1041,7 +1041,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 |