Python indentation deters newbies?

Jeffrey Froman jeffrey at I.slack
Sat Aug 14 05:06:22 CEST 2004


Terry Reedy wrote:

>> is that indentation determines the program flow -- they think its weird.
> 
> Giving that structured text (in English at least) routinely uses
> significant indentation (lists, outlines, block quotes) and that much
> algorithm pseudocode does the same (which was half the reason I called
> Python 'executable pseudocode'), I find it puzzling that so many find it
> 'weird' (if indeed that is true).

Me too, and in fact I don't believe that the people who complain about it
really think it's weird either. It's just fashionable to dislike Python for
that reason. If using indentation for program flow is so non-intuitive,
then why do C programmers complain so much about other C programmers
indentation, and spend so much energy "cleaning up" indentation to fit
their own idea of how C code should look? I'd think since indentation was
so "insignificant" that any C coder would happily accept any indentation
style as their attention "naturally" separated significant elements between
curly braces. Clearly, this is not the case though.

Jeffrey



More information about the Python-list mailing list