Concrete Proposal: while ... and while ...
Bernhard Herzog
herzog at online.de
Wed May 19 19:21:56 EDT 1999
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/
More information about the Python-list
mailing list