wasm-demo/demo/ermis-f/python_m/cur/1990

38 lines
1.1 KiB
Plaintext

From: herzog at online.de (Bernhard Herzog)
Date: 20 May 1999 01:21:56 +0200
Subject: Concrete Proposal: while ... and while ...
References: <7hsv80$g9j$1@news.tamu.edu> <y0j675pmg6c.fsf@vier.idi.ntnu.no> <7hufdb$rrh$1@news.tamu.edu> <y0j3e0sn301.fsf@vier.idi.ntnu.no>
Message-ID: <m3675ozluz.fsf@greebo.nodomain.de>
X-UID: 1990
mlh at idt.ntnu.no (Magnus L. Hetland) writes:
> Maybe -- but then the keyword "while" seems a bit strange...
>
> while:
> line = readline()
> and while line:
> print line
>
> To me, the "while: line=readline()" sounds like some kind of
> condition, and it certainly isn't... I would find this more
> understandable:
>
> repeat:
> line = readline()
> and while line:
> print line
>
> But then we have another keyword again...
Well, you could perhaps use 'exec' instead of 'while' or 'repeat'. Of
course, exec doesn't really indicate that the suite following is a loop.
--
Bernhard Herzog | Sketch, a python based drawing program
herzog at online.de | http://www.online.de/home/sketch/