Python indentation deters newbies?
peter at engcorp.com
Mon Aug 16 07:41:52 CEST 2004
Grant Edwards wrote:
> On 2004-08-16, Peter Hansen <peter at engcorp.com> wrote:
>>Please, *why* did it put you off?
> Dunno, it just did.
> It seems to me that you're asking for a rational explanation
> for an emotional response. It's like asking somebody "*why*
> don't you like pickled beets?" The answer you get is "I just
Hmm... not for me. The answer would be "because they
taste like dirt", or "I hate purple", or "anything pickled
sucks". "I just don't" looks a lot like a cop-out. If
it is an emotional reaction, then the reason someone doesn't
like pickled beets would be "because I have a negative
emotional reaction to them which I don't understand
and cannot put into words"... (but then writing about it
wouldn't make any sense ;-)
> Perhaps they're just too different from what you're
> used to eating. Perhaps there's something bad in your past
> associated with beets. It doesn't really matter, since it's
> not a reasoned, rational reaction.
At the time you have the reaction, you may not understand
it. Afterwards, you should be able to analyze it and
explain it, I believe. But, whatever, we're different
people. I can generally explain my reactions to things
while perhaps you can't.
> I think my negative reaction was because my only previous
> encounters with intentation significance was with Fortan IV and
> with Makefiles. I find dealing with both of those unpleasant
Ah, thank you! You _can_ do it. ;-) I'll buy this (not
that anyone should care whether I buy it or not ;-) as a
valid and interesting reason for an initially negative reaction
to Python's indentation.
The reason I'm asking this is because I believe that if there
really are a significant number of people with such a
reaction (not necessarily for the same reason as yours), then
if we can analyze and discover the most common reasons for
such a reaction, then it might well be possible to eliminate
the cause and avoid the reaction.
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...)
More information about the Python-list