Alien whitespace eating nanovirus strikes again!

Hans Nowak ivnowa at hvision.nl
Fri Jun 4 12:42:15 EDT 1999


On 4 Jun 99, Daniel Faulkner wrote:

> How many messages are there about this white space stuff? Looks like millions whats
> it all about?

Oh, this thread is only trivial compared to the one about the Python 
version that only exists in Guido's head so far. :o)

You are new to Python? The short story is:

in languages like C, you define blocks using block delimiters:

void p() 
{
    int x;
    blahblah();
}

or Pascal,

procedure P;
var x;
begin
    blahblah;
end;

(OK, so these examples don't make much sense. :-) Anyway, you'll get 
the point. Python does not have such delimiters; rather than that, 
indentation (thus, use of whitespace) is used:

def p():
    x = 0
    blahblah()

Same thing for if-constructs, while, etc.

Not everybody likes to use whitespace for indentation. This seems to 
be especially true for people coming from a C or Perl background. If 
you search DejaNews for old messages, you will find tons of messages 
dealing with this subject (usually people asking for block delimiters 
vs people defending the Python style).

I dare say that many people like this Python feature a lot, since it 
improves readability greatly. But as said, not everyone does, and 
this fuels discussions greatly. Those are really a waste of bandwidth 
though, since (IMO) Guido is not going to change it. :-)

Veel liefs,


--Hans Nowak (ivnowa at hvision.nl)
Homepage: http://fly.to/zephyrfalcon




More information about the Python-list mailing list