summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-08-08 03:05:04 (GMT)
committerGitHub <noreply@github.com>2020-08-08 03:05:04 (GMT)
commitde5de413e7f03e9cdcaf0cf96b13f4fe6bd5ccb6 (patch)
treec2496a4ff9bdb598178779ce43ee69d23af74f7b /Doc/library/functions.rst
parent398dabb6818992efac3b4df96255054a456907a3 (diff)
downloadcpython-de5de413e7f03e9cdcaf0cf96b13f4fe6bd5ccb6.zip
cpython-de5de413e7f03e9cdcaf0cf96b13f4fe6bd5ccb6.tar.gz
cpython-de5de413e7f03e9cdcaf0cf96b13f4fe6bd5ccb6.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/library/functions.rst')
-rw-r--r--Doc/library/functions.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 0f7df0e..8cf755a 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -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