From db4220ea09c2a36b3eb7edbde40b356c9caad10d Mon Sep 17 00:00:00 2001 From: Martin Panter Date: Fri, 11 Sep 2015 03:58:30 +0000 Subject: Issue #25030: Do not document seek() as if it accepts keyword arguments Patch from Shiyao Ma. --- Doc/library/io.rst | 13 +++++++------ Misc/ACKS | 1 + Modules/_io/bytesio.c | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Doc/library/io.rst b/Doc/library/io.rst index 3adf6e9..9b12045 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 @@ -760,10 +760,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 1a00ae3..41888b7 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1276,6 +1276,7 @@ Alexander Shigin Pete Shinners Michael Shiplett John W. Shipman +Shiyao Ma Alex Shkop Joel Shprentz Yue Shuaijie diff --git a/Modules/_io/bytesio.c b/Modules/_io/bytesio.c index 4652356..b55ab72 100644 --- a/Modules/_io/bytesio.c +++ b/Modules/_io/bytesio.c @@ -530,7 +530,7 @@ bytesio_iternext(bytesio *self) } PyDoc_STRVAR(seek_doc, -"seek(pos, whence=0) -> int. Change stream position.\n" +"seek(pos[, whence]) -> int. Change stream position.\n" "\n" "Seek to byte offset pos relative to position indicated by whence:\n" " 0 Start of stream (the default). pos should be >= 0;\n" -- cgit v0.12 mmer_singleton_lists'>aspect_shimmer_singleton_lists Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2002-07-01 18:24:38 (GMT)
committerjenglish <jenglish@flightlab.com>2002-07-01 18:24:38 (GMT)
commit67fad087ab438ebbeb8d38658e7bfe9183c1b8b7 (patch)
tree0b85a12ebaae6394723689fc31593c4ec7ebed17 /unix
parentd01a31dd2c3c0984c9ef185aec47a4c008e70b67 (diff)
downloadtcl-67fad087ab438ebbeb8d38658e7bfe9183c1b8b7.zip
tcl-67fad087ab438ebbeb8d38658e7bfe9183c1b8b7.tar.gz
tcl-67fad087ab438ebbeb8d38658e7bfe9183c1b8b7.tar.bz2
Spell-check, fixed typos (Updates from Larry Virden).