Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e83f899

Browse files
author
Victor Stinner
committed
Issue #13530: Document os.lseek() result
Patch written by Jérémy Anger.
1 parent 136ea49 commit e83f899

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

Doc/library/os.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ as internal buffering of data.
706706
by *how*: :const:`SEEK_SET` or ``0`` to set the position relative to the
707707
beginning of the file; :const:`SEEK_CUR` or ``1`` to set it relative to the
708708
current position; :const:`os.SEEK_END` or ``2`` to set it relative to the end of
709-
the file.
709+
the file. Return the new cursor position in bytes, starting from the beginning.
710710

711711
Availability: Unix, Windows.
712712

Misc/ACKS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ John Anderson
3030
Erik Andersén
3131
Oliver Andrich
3232
Ross Andrus
33+
Jérémy Anger
3334
Jon Anglin
3435
Éric Araujo
3536
Alicia Arlen

Modules/posixmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5687,7 +5687,8 @@ posix_dup2(PyObject *self, PyObject *args)
56875687

56885688
PyDoc_STRVAR(posix_lseek__doc__,
56895689
"lseek(fd, pos, how) -> newpos\n\n\
5690-
Set the current position of a file descriptor.");
5690+
Set the current position of a file descriptor.\n\
5691+
Return the new cursor position in bytes, starting from the beginning.");
56915692

56925693
static PyObject *
56935694
posix_lseek(PyObject *self, PyObject *args)

0 commit comments

Comments
 (0)