[Python-checkins] cpython (merge 3.5 -> default): Issue #25030: Merge seek() doc fixes from 3.5

martin.panter python-checkins at python.org
Fri Sep 11 06:40:48 CEST 2015


https://hg.python.org/cpython/rev/c4bb0da8b45e
changeset:   97904:c4bb0da8b45e
parent:      97900:7d76df6dafde
parent:      97903:a0c6f5358029
user:        Martin Panter <vadmium>
date:        Fri Sep 11 04:39:42 2015 +0000
summary:
  Issue #25030: Merge seek() doc fixes from 3.5

files:
  Doc/library/io.rst |  13 +++++++------
  Misc/ACKS          |   1 +
  2 files changed, 8 insertions(+), 6 deletions(-)


diff --git a/Doc/library/io.rst b/Doc/library/io.rst
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -301,11 +301,11 @@
       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 @@
 
       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
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1312,6 +1312,7 @@
 Pete Shinners
 Michael Shiplett
 John W. Shipman
+Shiyao Ma
 Alex Shkop
 Joel Shprentz
 Yue Shuaijie

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list