[issue31504] Documentation for return value for string.rindex is missing when search string is empty
Vedran Čačić
report at bugs.python.org
Sat Oct 31 15:44:47 EDT 2020
Vedran Čačić <vedgar at gmail.com> added the comment:
Maybe you would use 5, but I would use 7 and get the same result. If the docs say "X.rindex(Y) == i means i is the highest index where Y is found in X", and "Y is found in X at i" is interpreted as "X[i:i+len(Y)] == Y" (as Serhiy said), then there is no such (highest) index.
I understand what _you_'re saying, but please understand that the docs do not say anything like that.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31504>
_______________________________________
More information about the Python-bugs-list
mailing list