diff options
author | Bénédikt Tran <10796600+picnixz@users.noreply.github.com> | 2024-12-10 02:48:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-10 02:48:38 (GMT) |
commit | 58c753827ac7aa3d7f1495ac206c28bf2f6c67e8 (patch) | |
tree | e8aeddd9663ea5a9ef0bd6af10d1e19d9a73db30 /Doc | |
parent | 3b18af964da9814474a5db9e502962c7e0593e8d (diff) | |
download | cpython-58c753827ac7aa3d7f1495ac206c28bf2f6c67e8.zip cpython-58c753827ac7aa3d7f1495ac206c28bf2f6c67e8.tar.gz cpython-58c753827ac7aa3d7f1495ac206c28bf2f6c67e8.tar.bz2 |
gh-125420: implement `Sequence.index` API on `memoryview` objects (#125446)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/stdtypes.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index 4f4fc9f..f4e635d 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -4149,6 +4149,15 @@ copying. .. versionchanged:: 3.5 The source format is no longer restricted when casting to a byte view. + .. method:: index(value, start=0, stop=sys.maxsize, /) + + Return the index of the first occurrence of *value* (at or after + index *start* and before index *stop*). + + Raises a :exc:`ValueError` if *value* cannot be found. + + .. versionadded:: next + There are also several readonly attributes available: .. attribute:: obj |