Whitespace as syntax (was Re: Python Rocks!)

Mikael Olofsson mikael at isy.liu.se
Tue Feb 8 04:40:16 EST 2000


On 08-Feb-00 Thomas Hamelryck wrote:
 >  I am in exactly the same position. It was a serious design error.
 >  I wonder how the CP4A people are going to explain to complete
 >  computer illiterates that a python program can contain errors that
 >  are _not even visible_ when you look at the code. 

But they _are_ visible! It's just as visible to me as it is to the 
interpreter. Consider the following.

for whatever:
  if a:
    do_something
  else:
    do_something_else
   do_yet_another_thing

I can certainly see this error. I do not even need to read the code. It's
simply pattern recognition, which is what our eyes do best. What's more, 
I'm glad that the interpreter reprts this to me. What block should 
do_yet_another_thing be in? Did I mean 2 or 4 spaces? I'd better think 
that through.

/Mikael

-----------------------------------------------------------------------
E-Mail:  Mikael Olofsson <mikael at isy.liu.se>
WWW:     http://www.dtr.isy.liu.se/dtr/staff/mikael
Phone:   +46 - (0)13 - 28 1343
Telefax: +46 - (0)13 - 28 1339
Date:    08-Feb-00
Time:    10:28:14

This message was sent by XF-Mail.
-----------------------------------------------------------------------



More information about the Python-list mailing list