summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMartin Panter <vadmium>2015-09-11 03:58:30 (GMT)
committerMartin Panter <vadmium>2015-09-11 03:58:30 (GMT)
commit6f80464f4ae64c3b4dd65c641ddc9c156a23e510 (patch)
treeae42ff83c3d7ccb7be3bd8b1bd81ecae51b05149 /Doc
parent397c2103f7c859c16b9e09aaab95424f23c9f526 (diff)
downloadcpython-6f80464f4ae64c3b4dd65c641ddc9c156a23e510.zip
cpython-6f80464f4ae64c3b4dd65c641ddc9c156a23e510.tar.gz
cpython-6f80464f4ae64c3b4dd65c641ddc9c156a23e510.tar.bz2
Issue #25030: Do not document seek() as if it accepts keyword arguments
Patch from Shiyao Ma.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/io.rst13
1 files changed, 7 insertions, 6 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index ab5a043..33cbb7e 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -299,11 +299,11 @@ I/O Base Classes
Note that it's already possible to iterate on file objects using ``for
line in file: ...`` without calling ``file.readlines()``.
- .. method:: seek(offset, whence=SEEK_SET)
+ .. method:: seek(offset[, whence])
Change the stream position to the given byte *offset*. *offset* is
- interpreted relative to the position indicated by *whence*. Values for
- *whence* are:
+ interpreted relative to the position indicated by *whence*. The default
+ value for *whence* is :data:`SEEK_SET`. Values for *whence* are:
* :data:`SEEK_SET` or ``0`` -- start of the stream (the default);
*offset* should be zero or positive
@@ -716,10 +716,11 @@ Text I/O
If *limit* is specified, at most *limit* characters will be read.
- .. method:: seek(offset, whence=SEEK_SET)
+ .. method:: seek(offset[, whence])
- Change the stream position to the given *offset*. Behaviour depends
- on the *whence* parameter:
+ Change the stream position to the given *offset*. Behaviour depends on
+ the *whence* parameter. The default value for *whence* is
+ :data:`SEEK_SET`.
* :data:`SEEK_SET` or ``0``: seek from the start of the stream
(the default); *offset* must either be a number returned by