Python indentation deters newbies?
peter at engcorp.com
Mon Aug 16 15:21:46 CEST 2004
Antoon Pardon wrote:
> Op 2004-08-16, Peter Hansen schreef <peter at engcorp.com>:
>>Did you really not indent your code in those languages consisntly
> I can't answer for keith, but my answer is that it depends on
> what you consider consistent.
> My indentation was consistent with the structure of the algorithm.
> That is not necesarrily the same as the structure you implemeted
> that algorithm in.
Huh? How does an algorithm have structure that affects
indentation? It sounds like you are talking about some kind
of artistic considerations here.
> I think that I should be the final judge of what is the most
> appropiate way to use indentation, not the compilor/interpreter,
> even if it agrees with me.
So did you indent your code such that consecutive lines were
not indented to the same identation level even when they were
conceptually, logically, *algorithmically* part of the same
I know there are such people out there. I even had to fire one
once, roughly because he had no concept of how his failure to
write his code with anything resembling consistent indentation
meant that it was unreadable to others. (At least, that was the
surface symptom which warned us of deeper problems.) What I
doubt is that many of those people are out there rejecting
Python just because it doesn't let them write god-awful unreadable
code with artistic or random indentation.
More information about the Python-list