Skip to content

Commit

Permalink
Doc: Add a link to tutorial page from open() doc (pythonGH-21737)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bbkane authored Aug 8, 2020
1 parent 102b498 commit 705f145
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1055,7 +1055,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
Expand Down

0 comments on commit 705f145

Please sign in to comment.