This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: array.index() missing start and end
Type: enhancement Stage: resolved
Components: Versions: Python 3.10
Status: closed Resolution: duplicate
Dependencies: Superseder: Add start and stop parameters to the array.index()
View: 31956
Assigned To: Nosy List: ZackerySpytz, daniel.nicorici, rhettinger
Priority: normal Keywords:

Created on 2021-01-10 19:51 by daniel.nicorici, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (2)
msg384775 - (view) Author: Daniel Nicorici (daniel.nicorici) Date: 2021-01-10 19:51
Add support for array.index(x [,start [,end]]). Adding start and end would allow to loop thru the entire array (and not start all the time from 0).

Currently, is array.index(x) (and it returns the smallest i such that i is the index of the first occurrence of x in the array). 

For example, bytearray.index() has start and end and list.index() has also start and end, but for some reason start and end are missing from array.index.
msg384777 - (view) Author: Zackery Spytz (ZackerySpytz) * (Python triager) Date: 2021-01-10 20:44
This seems like a duplicate of bpo-31956.
Date User Action Args
2022-04-11 14:59:40adminsetgithub: 87050
2022-03-19 22:41:58iritkatrielsetstatus: open -> closed
superseder: Add start and stop parameters to the array.index()
resolution: duplicate
stage: resolved
2021-01-10 20:44:30ZackerySpytzsetnosy: + ZackerySpytz
messages: + msg384777
2021-01-10 20:15:05serhiy.storchakasetnosy: + rhettinger
2021-01-10 19:51:50daniel.nicoricicreate