[Python-Dev] PEP 3142: Add a "while" clause to generator expressions

Facundo Batista facundobatista at gmail.com
Mon Jan 19 17:43:35 CET 2009

2009/1/19 Gerald Britton <gerald.britton at gmail.com>:

> Could you please expand on your thoughts about possible confusion?
> That is, how do you see a programmer becoming confused if this option
> were added to the syntax.

My main concern about confusion is that you're adding a "while" that
actually will behave like a "break" in the "for".

I know that with "while" you read it better, but the meaning is
different in the generator/list comprehension "for" loop.


.    Facundo

Blog: http://www.taniquetil.com.ar/plog/
PyAr: http://www.python.org/ar/

More information about the Python-Dev mailing list