[issue24898] Documentation for str.find() is confusing

Ted Lemon report at bugs.python.org
Thu Aug 20 16:54:13 CEST 2015


Ted Lemon added the comment:

Hm, okay, that explains it.   I was previously mystified.  How about this as a refinement on your proposal, though:

Return the lowest index in the string where substring sub is found within the string.  Optional arguments start and end restrict the search to the slice of the string, s[start:end].  Returned index is relative to the beginning of the string, not the beginning of the slice. Return -1 if sub is not found.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24898>
_______________________________________


More information about the Python-bugs-list mailing list