Python 2.0

adjih at adjih at
Sat Jun 5 15:26:00 CEST 1999

In article <02hfonzsx2.fsf at>,
  Kumar Balachandran <kumar*xspam*@*xspam*> wrote:
> >>>>> "Graham" == Graham Matthews <graham at> writes:
>     Graham> Graham Matthews wrote in message
>     Graham> <7ik6mi$lbk$1 at>...
>     Graham> You are envangelising (a not uncommon response when
>     Graham> someone remotely criticises Python). Stop evangelising and
>     Graham> start considering the technical issues involve (read (!)
>     Graham> other posts for what those issues are).
>     Graham> graham
> Here is some useful evangelizing (methinks). One of the irritating
things about
> Python is the use of whitespace in syntax. Agreed, the code is
> readable without parentheses or braces, but why not have optional
> syntactic sugar such as
> if
> ...
> elif
> ...
> else
> ...
> fi
> def
> ...
> ...
> fed
> while
> ...
> elihw or wend
> for
> ...
> rof
> etc. It makes the language more elegant. When I see code using
> indentation or blank likes to achieve blocking of constructs, it
> reminds me of an old language (FORTRAN I think it was called:-).
> The change is simple to achieve if backward compatibility is given to
> accomodate people that grew up with FORTRAN.

As I just responded in the "Alien whitespace eating nanovirus strikes
again!" it is possible, although this will be only advisory (Python will
only rely on white space).
All you need to do is to write:


and then you could write

for i in range(100):
  if i%5==0:
    print "%d is divisible by 5" %i

-- Cedric

Sent via
Share what you know. Learn what you don't.

More information about the Python-list mailing list