[issue24284] Inconsistency in startswith/endswith
Martin Panter
report at bugs.python.org
Wed May 27 00:14:53 CEST 2015
Martin Panter added the comment:
How about this for What’s New:
* The :meth:`str.startswith` and :meth:`str.endswith` methods no longer return ``True`` when finding the empty string and the indexes are completely out of range. See :issue:`24284`.
Perhaps that is good enough, but if you wanted to be more precise, I think the actual condition is if the *start* index is beyond the end of the string, or *end* is before *start*.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24284>
_______________________________________
More information about the Python-bugs-list
mailing list