summaryrefslogtreecommitdiffstats
path: root/Doc/library/io.rst
diff options
context:
space:
mode:
authorMartin Panter <vadmium>2015-09-11 04:39:31 (GMT)
committerMartin Panter <vadmium>2015-09-11 04:39:31 (GMT)
commit0e8e78e15de645894ba44ce7c749dfeae80c2735 (patch)
treeeea7343cbf9d48a371589e2004e2c73162a92b95 /Doc/library/io.rst
parentb6855150397a86da84c30d1144075d4609b339be (diff)
parentdb4220ea09c2a36b3eb7edbde40b356c9caad10d (diff)
downloadcpython-0e8e78e15de645894ba44ce7c749dfeae80c2735.zip
cpython-0e8e78e15de645894ba44ce7c749dfeae80c2735.tar.gz
cpython-0e8e78e15de645894ba44ce7c749dfeae80c2735.tar.bz2
Issue #25030: Merge seek() doc fixes from 3.4 into 3.5
Diffstat (limited to 'Doc/library/io.rst')
-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 f009c65..ba0d550 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -301,11 +301,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
@@ -783,10 +783,11 @@ Text I/O
If *size* is specified, at most *size* 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