Hi all,

I found that there are str.index() and str.rindex(), but there is only
list.index() and no list.rindex(). So I filed the issue
https://bugs.python.org/issue36639 to provide list.rindex(). However, the
issue was rejected and closed with the comment:

> There were known, strong use cases for str.rindex().  The list.rindex()
method was intentionally omitted.  AFAICT no compelling use cases have
arisen, so we should continue to leave it out.  In general, we don't grow
the core APIs unnecessarily.

However, I am not sure what the known, strong use cases for str.rindex()
are. Why doesn't the strong use cases apply on list.rindex()? Could anyone
give me some examples? Thanks.

Best,
John Lin
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to