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

Calvin Spealman ironfroggy at gmail.com
Tue Jan 20 18:34:43 CET 2009

On Tue, Jan 20, 2009 at 12:00 PM, Vitor Bosshard <algorias at yahoo.com> wrote:
> ----- Mensaje original ----
>> De: Gerald Britton <gerald.britton at gmail.com>
>> Para: Vitor Bosshard <algorias at yahoo.com>
>> CC: python-3000 at udmvt.ru; python-dev at python.org
>> Enviado: martes, 20 de enero, 2009 13:40:07
>> Asunto: Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions
>> Right, but the PEP is only about generator expressions.
> Yes, but consistency with list comprehensions would be a nice thing to have, which is absent from both the "or raise()" idiom and the takewhile one (which is, by definition, a generator). The new syntax wouldn't have this issue.
> I'm not in favor of the change, just pointing this out.

I saw this to, and do want to throw in my two cents that it should be
consistent between them. We should not add something to one and not
the other. If the PEP, even if its rejected, doesn't change to reflect
that its suggestion is for both generator expressions and list
comprehensions, I think it should be considered invalid from the
start. We should never add syntax that makes list(<...>) != [<...>]
(where <...> is my stupid expression placeholder).

> Vitor
>      ¡Todo sobre la Liga Mexicana de fútbol! Estadisticas, resultados, calendario, fotos y más:<
> http://espanol.sports.yahoo.com/
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/ironfroggy%40gmail.com

Read my blog! I depend on your acceptance of my opinion! I am interesting!
Follow me if you're into that sort of thing: http://www.twitter.com/ironfroggy

More information about the Python-Dev mailing list