Re: [RFC] Draft Proposal for New Python Syntax

Guido.van.Rossum@cwi.nl
Thu, 26 May 1994 17:31:37 +0200

> What I would like to do is to type:
>
> if a = 0:
>
> while a < 10:
>
> a = a + 1;
>
> The parser would have to ignore completely blank lines, if this
> where for example a function then the next 'def' (starting at
> column 0) would terminate it in exactly the same way.

Oops. I remember that long ago Python didn't like blank lines -- they
had to be indented with the proper number of spaces or something like
that. But not any more -- in current Python (I can't remember at what
version this changed) blank lines, as well as lines containing only a
comment, are entirely ignored by the parser, so your example above
is indeed legal. The only exception is that when entering code
interactively, a blank line (but not one containing a comment)
terminates multi-line input.

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>