On Fri, Nov 24, 2017 at 5:06 PM, Nathaniel Smith <[email protected]> wrote: > On Fri, Nov 24, 2017 at 4:22 PM, Guido van Rossum <[email protected]> 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`. > > I would say that banning `yield` and `yield from` is like banning > `return` and `break`, but banning `await` is like banning function > calls.
I agree. I was going to make the point earlier in the thread that using "await" can mostly just be thought of as a delayed function call, but it didn't seem at risk of getting banned until Guido's comment so I didn't say anything (and there were too many comments anyways). I think it's in a different category for that reason. It's much easier to reason about than, say, "yield" and "yield from". --Chris _______________________________________________ Python-Dev mailing list [email protected] https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
