Skip to content

Commit

Permalink
Issue python#21860: Correct docstrings of FileIO.seek() and FileIO.tr…
Browse files Browse the repository at this point in the history
…uncate() methods.

Patch by Terry Chia.
  • Loading branch information
berkerpeksag committed Sep 24, 2014
2 parents daa910a + b87630c commit 43705d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions Misc/ACKS
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ Nicolas Chauvat
Jerry Chen
Michael Chermside
Ingrid Cheung
Terry Chia
Albert Chin-A-Young
Adal Chiriliuc
Matt Chisholm
Expand Down
8 changes: 5 additions & 3 deletions Modules/_io/fileio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down

0 comments on commit 43705d7

Please sign in to comment.