[Tutor] string indexing

Keith Winston keithwins at gmail.com
Mon Jan 20 01:19:46 CET 2014


On Sun, Jan 19, 2014 at 3:50 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
>> How would Python know whether you want find for gettext, mmap, str,
>> xml.etree.ElementTree.Element or xml.etree.ElementTree.ElementTree?
>
>
> Absolutely, but a newbie doesn't even guess that more than one find would
> exist. Or even that there would need to be more than one.

That's exactly it. I'm just getting to the point of being able to
understand how much I don't know, and (I'm only a little embarrassed
to admit) Alan's empty-string example was an "ah-ha" moment for me. I
expect Help will be a great deal more useful now (of course, as I type
that I realize I could have used the class name, help(str.find),
instead of an impromptu instance. Another little ah-ha). And of
course, the instant I understood all that, the point that Mark made
became obvious. But I didn't see it before.


-- 
Keith


More information about the Tutor mailing list