summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>2024-12-10 02:48:38 (GMT)
committerGitHub <noreply@github.com>2024-12-10 02:48:38 (GMT)
commit58c753827ac7aa3d7f1495ac206c28bf2f6c67e8 (patch)
treee8aeddd9663ea5a9ef0bd6af10d1e19d9a73db30 /Doc
parent3b18af964da9814474a5db9e502962c7e0593e8d (diff)
downloadcpython-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.rst9
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