summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Panter <vadmium>2015-09-11 04:39:42 (GMT)
committerMartin Panter <vadmium>2015-09-11 04:39:42 (GMT)
commitb26cbf9636b6218c198cc12a799ce903716a660f (patch)
treedaf307e2c6652730b0c98744cd34fd7bd2f081cb
parent7920b7063d28c8032f30eb7dd87cd88113e9741c (diff)
parent0e8e78e15de645894ba44ce7c749dfeae80c2735 (diff)
downloadcpython-b26cbf9636b6218c198cc12a799ce903716a660f.zip
cpython-b26cbf9636b6218c198cc12a799ce903716a660f.tar.gz
cpython-b26cbf9636b6218c198cc12a799ce903716a660f.tar.bz2
Issue #25030: Merge seek() doc fixes from 3.5
-rw-r--r--Doc/library/io.rst13
-rw-r--r--Misc/ACKS1
2 files changed, 8 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
diff --git a/Misc/ACKS b/Misc/ACKS
index be6ba2d..e26be93 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1312,6 +1312,7 @@ Alexander Shigin
Pete Shinners
Michael Shiplett
John W. Shipman
+Shiyao Ma
Alex Shkop
Joel Shprentz
Yue Shuaijie