[Tutor] RE: Tutor digest, Vol 1 #2 - 4 msgs

Martijn Faassen M.Faassen@vet.uu.nl
Mon, 08 Mar 1999 21:07:25 +0100

Alan Gauld wrote:
> Since folks seem to be introducing themselves...
> I am just starting with Python - looking for an alternative
> to Perl which I just hate for all sorts of reasons! Basically
> it offends my sense of programming purity. :-) But up to now
> it has been the only thing with that kind of sheer power...
> I've been programming for about 15 years in C, C++, awk,
> Smalltalk, Lisp and Delphi.(Oh and COBOL but I try to forget
> that...)
> Anyway, My point for a Python tutorial:
> Explain the colon!!! It gets a passing mention in Lutz's book,
> none at all in Watter's book. It took me (as an experienced
> programmer) at least half an hour to figure out how/when
> the colon should be used(mainly by browsing the demo code)
> a beginner to programming with no concept of a 'block of
> code' will be baffled IMHO.

This hangs together with 'indentation', though. Are you sure indentation
isn't explained in these books (I haven't read either). I don't recall
having had any problem grasping what the ':' was about (along with
indentation marking block structure). Of course I was already
experienced with other programming languages, so I don't count at as an
absolute beginner.

I agree a beginner tutorial should have a good explanation of 'block
structure' in programming, though. In Python this is marked by the : and
an indented block, but saying 'explain the colon' mystifies me. :)