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

Gerrit gerrit at nl.linux.org
Wed Feb 18 15:35:29 EST 2004


> "Paul Rubin" <http://phr.cx@NOSPAM.invalid> wrote in message
> news:7xwu6khofz.fsf at ruckus.brouhaha.com...
> > So it's yet another workaround for Python's lack of assignment
> > expressions.  I like
> >
> >     while (line := inputFile.readline()):
> >         ...
> >
> > a lot better.

I disagree. I think it's counter-intuitive to have an assignment inside
an expression. Assignments should be statements. Explicit is better than
implicit. What problem would this solve? And why the ':'?

Gerrit.

-- 
Weather in Twenthe, Netherlands 18/02 19:55 UTC:
	3.0°C Few clouds mostly clear wind 4.0 m/s NNE (57 m above NAP)
-- 
Asperger's Syndrome - a personal approach:
	http://people.nl.linux.org/~gerrit/english/




More information about the Python-list mailing list