Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Éric <[email protected]>
  • Loading branch information
JelleZijlstra and merwok authored May 2, 2022
commit ccf9af7f6790aebc75f03d7306d486e72c8d5167
4 changes: 2 additions & 2 deletions Doc/library/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ the backing store is natively made of bytes (such as in the case of a file),
encoding and decoding of data is made transparently as well as optional
translation of platform-specific newline characters.

The easiest way to create a text stream is with :meth:`~io.open`, optionally
The easiest way to create a text stream is with :meth:`open()`, optionally
specifying an encoding::

f = open("myfile.txt", "r", encoding="utf-8")
Expand All @@ -77,7 +77,7 @@ objects. No encoding, decoding, or newline translation is performed. This
category of streams can be used for all kinds of non-text data, and also when
manual control over the handling of text data is desired.

The easiest way to create a binary stream is with :meth:`~io.open` with ``'b'`` in
The easiest way to create a binary stream is with :meth:`open()` with ``'b'`` in
the mode string::

f = open("myfile.jpg", "rb")
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/zipfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ ZipFile Objects
compressed text files in :term:`universal newlines` mode.

.. versionchanged:: 3.6
:meth:`~ZipFile.open` can now be used to write files into the archive with the
:meth:`ZipFile.open` can now be used to write files into the archive with the
``mode='w'`` option.

.. versionchanged:: 3.6
Expand Down