Title: array.index() missing start and end
Type: enhancement Stage:
Components: Versions: Python 3.10
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: ZackerySpytz, daniel.nicorici, rhettinger
Priority: normal Keywords:

Created on 2021-01-10 19:51 by daniel.nicorici, last changed 2021-01-10 20:44 by ZackerySpytz.

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
2021-01-10 20:44:30ZackerySpytzsetnosy: + ZackerySpytz
messages: + msg384777
2021-01-10 20:15:05serhiy.storchakasetnosy: + rhettinger
2021-01-10 19:51:50daniel.nicoricicreate