[issue40531] Adding the method find() to list

Raymond Hettinger report at bugs.python.org
Wed May 6 11:30:09 EDT 2020


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Please take this to Python ideas.  My understanding is that index() is supposed to be the one-way-to-do-it going forward.  The find() API proved to be problematic because -1 is a valid index and people were hitting bugs by failing to check for the -1 and then doing an unintended s[-1].

----------
nosy: +rhettinger
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40531>
_______________________________________


More information about the Python-bugs-list mailing list