You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If define s1.startswith(s2, start, end) for non-negative indices and non-tuple s2 as an equivalent to the expression start + len(s2) <= end and s2[start: start + len(s2)] == s2 or to s1.find(s2, start, end) == start, "".startswith("", 1, 0) should be False.
The same issue exists for endswith. See bpo-24243 for more detailed discussion.
Proposed patch fixes str.startswith and str.endswith.
I think this can only be applied in a feature release (and I think it should be, because of the backward-compatibility-with-python2 issue). However, since this is potentially controversial, we need some more opinions.
Just in the what's new porting section, I think. The fact that there "should" be very little to no code that relies on this is why I'd like to see it fixed. The fact that the report was a theoretical one, and not one that broke code, is why I think we should fix it only in 3.5.