Python 2.0

adjih at technologist.com adjih at technologist.com
Sat Jun 5 09:26:00 EDT 1999


In article <02hfonzsx2.fsf at rtp.ericsson.se>,
  Kumar Balachandran <kumar*xspam*@*xspam*rtp.ericsson.se> wrote:
>
>
> >>>>> "Graham" == Graham Matthews <graham at sloth.math.uga.edu> writes:
>
>     Graham> Graham Matthews wrote in message
>     Graham> <7ik6mi$lbk$1 at cronkite.cc.uga.edu>...
>     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:

fi,fed,elihw,wend,rof=0,0,0,0,0

and then you could write

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


-- Cedric


Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.




More information about the Python-list mailing list