PEP-0315--Enhanced While Loop: An idea for an alternative syntax

Erik Max Francis max at alcyone.com
Wed Feb 18 01:51:19 EST 2004


Paul Rubin wrote:

> So it's yet another workaround for Python's lack of assignment
> expressions.  I like
> 
>     while (line := inputFile.readline()):
>         ...
> 
> a lot better.

(Please check my correction, it's actually not as dumb as I suggested.)

-- 
 __ Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
/  \ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
\__/ The doors of Heaven and Hell are adjacent and identical.
    -- Nikos Kazantzakis



More information about the Python-list mailing list