Skip to content

Commit 2847a75

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 f54f062 commit 2847a75

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
@@ -306,7 +306,7 @@ I/O Base Classes
306306
Note that it's already possible to iterate on file objects using ``for
307307
line in file: ...`` without calling ``file.readlines()``.
308308

309-
.. method:: seek(offset[, whence])
309+
.. method:: seek(offset, whence=SEEK_SET)
310310

311311
Change the stream position to the given byte *offset*. *offset* is
312312
interpreted relative to the position indicated by *whence*. The default
@@ -810,7 +810,7 @@ Text I/O
810810

811811
If *size* is specified, at most *size* characters will be read.
812812

813-
.. method:: seek(offset[, whence])
813+
.. method:: seek(offset, whence=SEEK_SET)
814814

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

0 commit comments

Comments
 (0)