diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2014-09-24 09:44:06 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2014-09-24 09:44:06 (GMT) |
commit | 43705d76aa39a9517ffa5fa124f9333a7874fbd9 (patch) | |
tree | a52a06ce258416ed51a51585213d6c70ea9a4251 /Modules/_io/fileio.c | |
parent | daa910acde7542dece655c15ce2bac814fe7b28d (diff) | |
parent | b87630c273ab3ff68d4dbee61fe7ec9c65eeccb8 (diff) | |
download | cpython-43705d76aa39a9517ffa5fa124f9333a7874fbd9.zip cpython-43705d76aa39a9517ffa5fa124f9333a7874fbd9.tar.gz cpython-43705d76aa39a9517ffa5fa124f9333a7874fbd9.tar.bz2 |
Issue #21860: Correct docstrings of FileIO.seek() and FileIO.truncate() methods.
Patch by Terry Chia.
Diffstat (limited to 'Modules/_io/fileio.c')
-rw-r--r-- | Modules/_io/fileio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c index 84d2ff3..2e0fbf9 100644 --- a/Modules/_io/fileio.c +++ b/Modules/_io/fileio.c @@ -1127,7 +1127,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" @@ -1139,9 +1140,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 |