]> granicus.if.org Git - python/commitdiff
Issue #21860: Correct docstrings of FileIO.seek() and FileIO.truncate() methods.
authorBerker Peksag <berker.peksag@gmail.com>
Wed, 24 Sep 2014 09:54:25 +0000 (12:54 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Wed, 24 Sep 2014 09:54:25 +0000 (12:54 +0300)
Patch by Terry Chia.

Misc/ACKS
Modules/_io/fileio.c

index 15125e5e5df87964eacb3fdb6ac93b8d11557b76..a891869d366e1983d490f51830ad8e00d93e658c 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -233,6 +233,7 @@ Nicolas Chauvat
 Jerry Chen
 Michael Chermside
 Ingrid Cheung
+Terry Chia
 Albert Chin-A-Young
 Adal Chiriliuc
 Matt Chisholm
index 6890ec3e5e145c529e29077c0716adef7b8f8fdc..94f62d0cfe99f24b420735294c6b5d73ec164672 100644 (file)
@@ -980,7 +980,8 @@ PyDoc_STRVAR(fileno_doc,
 "This is needed for lower-level file interfaces, such the fcntl module.");
 
 PyDoc_STRVAR(seek_doc,
-"seek(offset: int[, whence: int]) -> None.  Move to new file position.\n"
+"seek(offset: int[, whence: int]) -> int.  Move to new file position\n"
+"and return the file position.\n"
 "\n"
 "Argument offset is a byte count.  Optional argument whence defaults to\n"
 "0 (offset from start of file, offset should be >= 0); other values are 1\n"
@@ -992,9 +993,10 @@ PyDoc_STRVAR(seek_doc,
 
 #ifdef HAVE_FTRUNCATE
 PyDoc_STRVAR(truncate_doc,
-"truncate([size: int]) -> None.  Truncate the file to at most size bytes.\n"
+"truncate([size: int]) -> int.  Truncate the file to at most size bytes and\n"
+"return the truncated size.\n"
 "\n"
-"Size defaults to the current file position, as returned by tell()."
+"Size defaults to the current file position, as returned by tell().\n"
 "The current file position is changed to the value of size.");
 #endif