Rethinking the Python tutorial

JW John-Whitlock at ieee.org
Tue Feb 14 15:13:18 EST 2006


Here's my two cents -

I started with the official tutorial.  It seemed up to date to me.
Things that changed from 2.4 to 2.5 changed in the tutorial as well.  I
still refer to it every few days, because it had been a useful
reference for the basic data types.  I like that it seemlessly links
into the other documents, both online and in the local MS Help format.
It took a couple of days to get through, and gave me enough of an
introduction to the library that I could get started on the Python
Challenge.  I don't think it's broken enough to throw away completely.
Bug reports filed at sf.net appear to be responded to quickly.

I haven't tried "A Byte of Python", so I can't comment.

I tried to learn from "Dive into Python", but I found that it went too
quickly.  I have a lot of C and C++ experience, but I needed the more
basic stuff, like dictionaries, tuples, etc. explained in more detail.
It was a very useful guide once I had the basics, but after my initial
experience with it I put Python away for a few months.

"Dive into Python" is not being kept up to date.  The last revision was
May 2004, and several things have changed since then.  For instance,
chapter 4, on introspection, creates a program called apihelper.py,
which uses introspection and doc strings to print the usage of an
object.  This is all great stuff, which would be part of my toolkit,
except that there is a built-in, help(), that does the same thing.  I
had to go to the downloaded source to find that out.  In other cases,
the tutorial still teaches to older versions of Python, sometimes with
notes for the newer styles, sometimes without.

Another downside is the use of internet sources for examples.  For
instance, his example for a web feed is
http://diveintomark.org/xml/atom.xml, which replies with a "410 Gone".
As you might guess, this was the author's server, and might have been
removed because of all the people taking the tutorial.  This would have
to be fixed, to make chapters 11 and 12 make much sense.

As for a wiki version of the tutorial, I think the MoinMoin docs are a
good example.  MoinMoin is a wiki engine running Python, and the
documents are distributed with each engine.  These documents can be
seen on the project website,
http://moinmoin.wikiwikiweb.de/HelpContents.  There is a second wiki at
http://moinmaster.wikiwikiweb.de/HelpContents , which contains the
"master" documents.  Those that want to help improve, correct, or
translate documents do their work on this wiki.  It lowers the number
of pages that maintainers have to review, so that a consistant quality
can be maintained.  It also is a (slight) barrier to entry, so that
casual users don't make random changes.

I think the most important thing for a tutorial is a consistant style
and a consistant idea of the user's capabilities.  This is easiest with
a single maintainer, but requires constant dilligence and a subdued ego
for a collaborative document.




More information about the Python-list mailing list