Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-37635: Update arg name for seek() in IO tutorial #16147

Merged
merged 1 commit into from
Sep 14, 2019
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions Doc/tutorial/inputoutput.rst
Original file line number Diff line number Diff line change
Expand Up @@ -412,11 +412,11 @@ or a bytes object (in binary mode) -- before writing them::
represented as number of bytes from the beginning of the file when in binary mode and
an opaque number when in text mode.

To change the file object's position, use ``f.seek(offset, from_what)``. The position is computed
To change the file object's position, use ``f.seek(offset, whence)``. The position is computed
from adding *offset* to a reference point; the reference point is selected by
the *from_what* argument. A *from_what* value of 0 measures from the beginning
the *whence* argument. A *whence* value of 0 measures from the beginning
of the file, 1 uses the current file position, and 2 uses the end of the file as
the reference point. *from_what* can be omitted and defaults to 0, using the
the reference point. *whence* can be omitted and defaults to 0, using the
beginning of the file as the reference point. ::

>>> f = open('workfile', 'rb+')
Expand Down