do people really complain about significant whitespace?

Slawomir Nowaczyk slawomir.nowaczyk.847 at student.lu.se
Wed Aug 9 10:23:22 EDT 2006


On Wed, 09 Aug 2006 05:00:20 -0700
"brianmce at gmail.com" <brianmce at gmail.com> wrote:

#> Slawomir Nowaczyk wrote:
#> >
#> > I must admit I do not get this "indicate intentions twice" argument,
#> > even though I heard it a number of times now... It's not that braces
#> > require more work or more typing or something, after all -- at least
#> > not if one is using a decent editor.
#> 
#> Its not the typing, its the fact that when you say the same thing
#> twice, there is the potential for them to get out of sync.  

Which, in my book, is the *right* thing... if I see a wrongly indented
piece of code, that's a good sign that it needs to be checked. It's
the same principle as in "if documentation and code disagree, both are
probably wrong."

YMMV, of course.

#> If the method the compiler uses (braces) and the method the human
#> uses (indentation) to determine what the code does don't agree,
#> then a reader will be likely to misunderstand what it will actually
#> do.

Well, not in my experience. In my experience, such discrepancies
usually only show up in places where something bad happens anyway.

#> One of the driving principles behind Python is that, because code
#> will be read more often than written, readability is more
#> important.

That's exactly my point :)

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( Slawomir.Nowaczyk at cs.lth.se )

Today advance is so rapid that even the astronauts who set foot on the
moon in 1969 had never seen a digital watch




More information about the Python-list mailing list