[issue37490] poor documentation for .startswith, .endswith

Steve Holden report at bugs.python.org
Wed Jul 3 03:41:19 EDT 2019


Steve Holden <steve at holdenweb.com> added the comment:

"Is the same as" is a little misleading - "gives the same result as" would be better, since there is little doubt actually slicing the subject strings would be massively less efficient in looping contexts.

The re module offers the start and end arguments to so many functions/methods for precisely this reason, so perhaps that module's documentation will contain helpful wording that could  be copied or referenced.

----------
nosy: +holdenweb

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37490>
_______________________________________


More information about the Python-bugs-list mailing list