[Python-checkins] [3.11] gh-107801: Improve the docs of the SEEK_* constants (GH-108099) (#108100)
erlend-aasland
webhook-mailer at python.org
Thu Aug 17 16:52:46 EDT 2023
https://github.com/python/cpython/commit/d6555abfa7384b5a40435a11bdd2aa6bbf8f5cfc
commit: d6555abfa7384b5a40435a11bdd2aa6bbf8f5cfc
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: erlend-aasland <erlend.aasland at protonmail.com>
date: 2023-08-17T20:52:43Z
summary:
[3.11] gh-107801: Improve the docs of the SEEK_* constants (GH-108099) (#108100)
(cherry picked from commit 02079b010c39a89b284e8f0bb6d5f378e554260e)
Co-authored-by: Erlend E. Aasland <erlend at python.org>
files:
M Doc/library/os.rst
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 1d0d1049ebd7e..993236c521a87 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -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,
More information about the Python-checkins
mailing list