Python indentation deters newbies?
grante at visi.com
Mon Aug 16 07:07:04 CEST 2004
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
don't." 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.
> Didn't you already indent your code consistently?
> Didn't you think that the removal of those braces would
> immediately make the code more readable (fewer lines, fewer
> extra cruft to distract the eye) and easier to type?
> I'm curious why more people don't have "neat!" as their very
> first thought on encountering this, rather than "yuck!".
It's a good question, but based on my extensive background of 3
undergrad psych classes, I don't think you're going to get
accurate answers from the people experiencing the reactions.
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
(though I've gotten used to Makefiles over a period of 20+
years, I still trip of the "tab" thing several times a month --
at least Gnu make is kind enough to tell you exactly what you
In my case, I desperately needed a way to fetch e-mails from
MS-Outlook, and writing a Python program looked like my only
shot. So I went ahead and tried it. Within a few hours, I
discovered I liked Python way of indentation. Now, with the
exception of the occasional shell script, I use Python for
everything that's not embedded or in kernel space.
Grant Edwards grante Yow! Dizzy, are we
at "REAL PEOPLE" or "AMAZING
More information about the Python-list