[Tutor] Python Docs (Was: Reformatting phone number)

Dotan Cohen dotancohen at gmail.com
Thu Aug 21 19:25:29 CEST 2008


2008/8/21 Kent Johnson <kent37 at tds.net>:
> On Thu, Aug 21, 2008 at 12:01 PM, Dotan Cohen <dotancohen at gmail.com> wrote:
>> 2008/8/21 Kent Johnson <kent37 at tds.net>:
>>> Chapters 2 and 3 of the library reference are highly recommended.
>>> http://docs.python.org/lib/lib.html
>>
>> Let's start from there. I need the startswith() function, but I do not
>> know it's name. I search for "strings" and find this:
>> 4. String Services
>>    * 4.1 string -- Common string operations
>>          o 4.1.3 String functions
>
> and somehow you missed
> # 3.6.1 String Methods
> # 3.6.2 String Formatting Operations
>
> which even should have come first in your search.

I remember passing on String Formatting Operations, but String Methods
went right past me!

>> But on that page, this is all there is:
> <snip>
>
> But the *very next page*, called "Deprecated string functions", links
> to 3.6.1 which is what you want.

I did not look at depreciated functions because I want to learn the
language that is, not the language that was. Why would I learn a
function that will likely be removed soon when I can learn the proper
replacement function?

>> So Python has only two string functions? That's what it looks like.
>
> I think it looks like you are not trying very hard, or that you are
> letting your expectations color your search too much.

I am trying moderately hard, and I am letting my expectations color my
experience. That's how I bugtest KDE, *buntus, and Fedora, and that is
how I approach any new project. I make 90% effort and I ask about the
other 10%.

>> Is there any place to suggest
>> improvements to the docs? I see on the python.org site it is suggested
>> to email website bugs to the site admin. Does that go for the docs?
>
> At the bottom of every page in the docs it says, "See About this
> document... [link] for information on suggesting changes."

I conveniently did not read the footer of the page I was on, instead I
grepped 10 pages starting from the homepage! Naturally...

> Specific
> suggestions for improvement are more likely to be well received than
> complaints.

Naturally, so long as I know the information. I don't file 'this sucks' bugs.

> I guess I am a little defensive here, I think the docs are pretty
> good.

That's fine. I know that many a flamewar had begun in a similar vein,
and even I feel that I am treading over troll-laden bridges when I
mention these issues.

> It's true that beginners don't realize that so much meat is in
> the library reference, I'm not sure how to make that more obvious.

That's why I asked to whom to suggest. It's easier for beginners to
say "this is what I tried" than for the experienced to try to think
like a noob.

> But
> your particular problems in finding endswith() in the LR I think come
> from you wearing PHP-colored blinders.

That may be. I know that I will have to make an effort to acquaint
myself with the Python docs. Part of that effort is forgetting what I
already know.

Thank you for your suggestions and your patience.

-- 
Dotan Cohen

http://what-is-what.com
http://gibberish.co.il
א-ב-ג-ד-ה-ו-ז-ח-ט-י-ך-כ-ל-ם-מ-ן-נ-ס-ע-ף-פ-ץ-צ-ק-ר-ש-ת

ä-ö-ü-ß-Ä-Ö-Ü


More information about the Tutor mailing list