[docs] [issue31504] Documentation for return value for string.rindex is missing when search string is empty
report at bugs.python.org
Mon Sep 18 05:11:26 EDT 2017
Martin Panter added the comment:
The behaviour for searching for empty strings in Python is inconsistent; see Issue 24243. IMO the behaviour for the (r)find/index methods is sensible, but it is worth making the documentation explicit.
The returned indexes you have given (5, 1, and 0) are valid for slicing.
Python tracker <report at bugs.python.org>
More information about the docs