Skip to content

Commit 0517375

Browse files
Document default parameter of .seek() in the signature. (GH-14691)
(cherry picked from commit 2a3d4d9) Co-authored-by: Benjamin Peterson <[email protected]>
1 parent 00bf4d6 commit 0517375

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/io.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ I/O Base Classes
304304
Note that it's already possible to iterate on file objects using ``for
305305
line in file: ...`` without calling ``file.readlines()``.
306306

307-
.. method:: seek(offset[, whence])
307+
.. method:: seek(offset, whence=SEEK_SET)
308308

309309
Change the stream position to the given byte *offset*. *offset* is
310310
interpreted relative to the position indicated by *whence*. The default
@@ -736,7 +736,7 @@ Text I/O
736736

737737
If *limit* is specified, at most *limit* characters will be read.
738738

739-
.. method:: seek(offset[, whence])
739+
.. method:: seek(offset, whence=SEEK_SET)
740740

741741
Change the stream position to the given *offset*. Behaviour depends on
742742
the *whence* parameter. The default value for *whence* is

0 commit comments

Comments
 (0)