from using str.rpartition to str.rindex. Closes Issue5213.
been done purely to help transitions from 2.7 to 3.1.