Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:

I don't have Python 3.7 available to me, but in 3.5 the behaviour of 
u.startswith(v) with an empty v seems consistent to me:


py> "alpha".startswith("", 20, 30)
True
py> "alpha"[20:30].startswith("")
True

py> "".startswith("", 20, 30)
True
py> ""[20:30].startswith("")
True

So I can't see any inconsistency that might be fixed by always returning True 
in the case v="", as that appears to already be the case.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31984>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to