[issue37490] poor documentation for .startswith, .endswith
Steven D'Aprano
report at bugs.python.org
Wed Jul 3 05:19:29 EDT 2019
Steven D'Aprano <steve+python at pearwood.info> added the comment:
Perhaps it would help if we spelled out the behaviour more explicitly?
str.startswith(prefix[, start=0[, end=len(string)]])
Return True if the slice of string between start (defaults to the beginning of the string) and end (defaults to the end of the string) starts with the prefix, otherwise return False. prefix can also be a tuple of prefixes to look for.
(To be frank, I don't think we need to do this, I think the docs are fine as-is, but if others disagree perhaps this is an improvment.)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37490>
_______________________________________
More information about the Python-bugs-list
mailing list