[Python-ideas] string codes & substring equality

Ethan Furman ethan at stoneleaf.us
Wed Nov 27 23:28:00 CET 2013


On 11/27/2013 01:34 PM, spir wrote:
> On 11/27/2013 09:01 PM, Paul Moore wrote:
>> On 27 November 2013 17:59, MRAB <python at mrabarnett.plus.com> wrote:
>>>
>>> --> help(str.startswith)
>>> Help on method_descriptor:
>>>
>>> startswith(...)
>>>      S.startswith(prefix[, start[, end]]) -> bool
>>
>> Wow! I never knew that startswith/endswith accepted start and end
>> arguments. Something new I learned today - thanks :-)
>
> You're not the only one ;-) I learnt it yesterday. Probably the method name misleads (not only you and i?.

What's misleading about it?  And how hard is it to look it up in the docs (or help)?  That's what I do when I'm going to 
use something I haven't before.

--
~Ethan~


More information about the Python-ideas mailing list