PEP: statements in control structures

Kirill Simonov kirill at xyz.donetsk.ua
Thu Oct 18 17:29:41 EDT 2001


On Wed, Oct 17, 2001 at 09:37:46PM +0000, Huaiyu Zhu wrote:

> 
>                 PEP: Statements in Control Structures
> 

How about such alternative syntax

while line where line = file.readline():
    process(line)

There is new keyword "where", but it is much easy to read than

while line = file.readline(); line:
    process(line)


\Xi





More information about the Python-list mailing list