summaryrefslogtreecommitdiffstats
path: root/Doc/library/array.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/array.rst')
-rw-r--r--Doc/library/array.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/array.rst b/Doc/library/array.rst
index ff3ec6b..18a768d 100644
--- a/Doc/library/array.rst
+++ b/Doc/library/array.rst
@@ -178,11 +178,15 @@ The following data items and methods are also supported:
array of some other type.
-.. method:: array.index(x)
+.. method:: array.index(x[, start[, stop]])
Return the smallest *i* such that *i* is the index of the first occurrence of
- *x* in the array.
+ *x* in the array. The optional arguments *start* and *stop* can be
+ specified to search for *x* within a subsection of the array. Raise
+ :exc:`ValueError` if *x* is not found.
+ .. versionchanged:: 3.10
+ Added optional *start* and *stop* parameters.
.. method:: array.insert(i, x)