Python indentation deters newbies?

Andrea Griffini agriff at tin.it
Mon Aug 16 03:10:03 EDT 2004


On Mon, 16 Aug 2004 01:41:52 -0400, Peter Hansen <peter at engcorp.com>
wrote:

>For example, if 90% of people who have the "indentation rash"
>had previous encounters with FORTRAN IV, then it ought to
>be possible to make it obvious in the early documentation
>(tutorial, intro page, etc) that Python is not FORTRAN and
>doesn't suffer from the same limitations with respect to
>indentation/whitespace significance as FORTRAN does.
>
>(Not that I think we'll really find this particular one
>to be the biggie.  But that roughly describes my purpose...)

Not sure if this would help. I have to admit that at first
the idea of whitespaces instead of braces generated a general
repulsion. This probably due to FORTRAN or COBOL memories (note
that I never did any real work with those languages... just
high-school code snippets)... but the point is that this was
just BEFORE reading any documentation on python.
Before installing it and giving it a try the only source of
knowledge was an earsay that whitespaces was important in
python... and even if my memories of high-school are mostly
really nices this triggered an immediate "oh-no!".

There is no need to tell that now I'm just more than happy
to use indentation... it really works beautifully and takes
probably 5 minutes to forget braces for structure and see
how they are indeed noise and not information.

The only truly annoying thing is the hideous tab problem...
I've personally banned tabs since when they become unreliable
(i.e. when they lost their comfortable 8-spaces size: seems
that someone didn't understand that making a tab meaning
anything was indeed making tab mean nothing), but I'm
still fighting with collegues that on VC++ insist on
doing stupid things with tabs (like changing their size
every couple of months and keeping the "use tabs" checkbox
in the preferences dialog ... IMO basically because they
can't see the logical distinction between tab size and
indent size).

Andrea



More information about the Python-list mailing list