[3.11] gh-107801: Improve the docs of the SEEK_* constants (GH-108099) (#108100)

(cherry picked from commit 02079b010c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
This commit is contained in:
Miss Islington (bot) 2023-08-17 13:52:43 -07:00 committed by GitHub
parent b389939be9
commit d6555abfa7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 4 deletions

View File

@ -1070,16 +1070,26 @@ as internal buffering of data.
SEEK_CUR
SEEK_END
Parameters to the :func:`lseek` function. Their values are 0, 1, and 2,
respectively.
Parameters to the :func:`lseek` function and the :meth:`~io.IOBase.seek`
method on :term:`file-like objects <file object>`,
for whence to adjust the file position indicator.
:const:`SEEK_SET`
Adjust the file position relative to the beginning of the file.
:const:`SEEK_CUR`
Adjust the file position relative to the current file position.
:const:`SEEK_END`
Adjust the file position relative to the end of the file.
Their values are 0, 1, and 2, respectively.
.. data:: SEEK_HOLE
SEEK_DATA
Parameters to the :func:`lseek` function and the :meth:`~io.IOBase.seek`
method on file objects, for seeking file data and holes on sparsely
allocated files.
method on :term:`file-like objects <file object>`,
for seeking file data and holes on sparsely allocated files.
:data:`!SEEK_DATA`
Adjust the file offset to the next location containing data,