]> 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:43:29 +0000 (12:43 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Wed, 24 Sep 2014 09:43:29 +0000 (12:43 +0300)
Patch by Terry Chia.

Misc/ACKS
Modules/_io/fileio.c

index 4a69dfe6e11518815cd871e1686c95ae42ea6182..1cd18f42d5b8242a0fc6a2e7ed0a10377958f842 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -237,6 +237,7 @@ Nicolas Chauvat
 Jerry Chen
 Michael Chermside
 Ingrid Cheung
+Terry Chia
 Albert Chin-A-Young
 Adal Chiriliuc
 Matt Chisholm
index 81e2906a2643c5d3513131ffad6a8a3b22866770..a2b253bd03b16b478b400f51fef6e6fc349f9c64 100644 (file)
@@ -1124,7 +1124,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 and\n"
+"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"
@@ -1136,9 +1137,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\n"
+"and 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