[Python-ideas] PEP 572 version 2: Statement-Local Name Bindings

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 2 20:48:30 EST 2018


Chris Angelico wrote:
> It would NOT work for anything where the bool() of
> the desired object doesn't exactly match the loop's condition.

    while condition(x) where x = something():
       ...

-- 
Greg


More information about the Python-ideas mailing list