[Python-Dev] (no subject)

Nick Coghlan ncoghlan at gmail.com
Tue Feb 10 14:26:19 CET 2015


On 10 Feb 2015 19:41, "Paul Moore" <p.f.moore at gmail.com> wrote:
>
> I agree completely with Donald here. The comprehension syntax has
> consistently been the part of the proposal that has resulted in
> confused questions from reviewers, and I don't think it's at all
> intuitive.
>
> Is it allowable to vote on parts of the PEP separately? If not, then
> the comprehension syntax is enough for me to reject the whole
> proposal. If we can look at parts in isolation, I'm OK with saying -1
> to the comprehension syntax and then we can look at whether the other
> parts of the PEP add enough to be worth it (the comprehension side is
> enough of a distraction that I haven't really considered the other
> bits yet).

It occurs to me that the PEP effectively changes the core of a generator
expression from "yield x" to "yield from x" if the tuple expansion syntax
is used. If we rejected the "yield *x" syntax for standalone yield
expressions, I don't think it makes sense to now add it for generator
expressions.

So I guess that adds me to the -1 camp on the comprehension/generator
expression part of the story - it doesn't make things all that much easier
to write than the relevant nested loop, and it makes them notably harder to
read.

I haven't formed an opinion on the rest of the PEP yet, as it's been a
while since I read the full text. I'll read through the latest version
tomorrow.

Regards,
Nick.

>
> Paul
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20150210/2e8a29c9/attachment.html>


More information about the Python-Dev mailing list