On Fri, Nov 24, 2017 at 7:22 PM, Guido van Rossum <gu...@python.org> wrote:
> The more I hear about this topic, the more I think that `await`, `yield` and
> `yield from` should all be banned from occurring in all comprehensions and
> generator expressions. That's not much different from disallowing `return`
> or `break`.

IMO disallowing using await in comprehensions would be a huge mistake.
I've personally seen a lot of code that uses the syntax.

Moreover, I haven't seen any complaints about await expressions in
comprehensions in this thread or *anywhere else*.  In this thread I
only see complaints about 'yield' expression, and that's easy to
understand -- yield in comprehensions is just unusable.  'await' is
fundamentally different, because it's essentially a calling
convention.

While "provisional" status for a PEP ultimately gives us power to
remove every trace of it in the next release, I think that it
decisions like that have to be based on some commonly reported
problems and complaints.  My 2c.

Yury
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to