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.

Author Phaqui
Recipients Phaqui, Ryan G., nanjekyejoannah, niki.spahiev, rhettinger, serhiy.storchaka, vstinner
Date 2019-09-15.23:33:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I have actually managed to lost my local branch of this fix, though I assume I can just start another one, manually copy over the changes, somehow mark this current PR as cancelled, aborted, or in my option the best: "replaced/superseeded by: [new PR]". In any case, there were discussions that seem to be unresolved, allow me to summarize:

* Document that index() raises ValueError when *value* is not found?
> vstinner: We don't do this, remove this addition.
> serhiy: Other index() methods does this.
---> My patch current does this. Who has final saying here?

* 'start' and 'stop' arguments are not keyword arguments, and also not shown in the signature as '.. start=0 ..' for this very reason (it may make them look as keyword arguments). Also, this lines up with list.index() for consistency. Wishes about changing this for all index()-methods has been expressed, but it seems to be consensus on doing this in unison for all index()-methods at once, in a bigger change... So, what is currently in the PR is good enough for now, or?

* Wording in documentation: Clarify that "the returned index is still relative to the start of the array, not the searched sub sequence" or not?

* Comment in the code about checking the length of the array on each iteration? There were comments about it being "confusing" - and while I agree, the other index()-code for lists, does not comment on this. Again I followed the path of most consistency, but I did receive comments about this. Yes to descriptive comments, or not?


Generally speaking: In the end, all I really did was mimic how list.index() is both written and documented, and that's when discussions about issues related to that started occurring, and so I now remember that I halted my PR, waiting for these issues to be resolved.
Date User Action Args
2019-09-15 23:33:40Phaquisetrecipients: + Phaqui, rhettinger, vstinner, serhiy.storchaka, niki.spahiev, nanjekyejoannah, Ryan G.
2019-09-15 23:33:40Phaquisetmessageid: <>
2019-09-15 23:33:40Phaquilinkissue31956 messages
2019-09-15 23:33:39Phaquicreate