On Wed, Nov 22, 2017 at 11:11 AM, Paul Moore <p.f.mo...@gmail.com> wrote: [..] > But by the logic you just described, await isn't (or shouldn't be) > allowed, surely?
No, that's a stretch. People can understand and actually use 'yield (await foo())', but they usually can't figure what 'yield (yield foo())' actually does: def foo(): yield (yield 1) Who on this mailing list can meaningfully use the 'foo()' generator? async def bar(): yield (await foo()) 'bar()' is perfectly usable in an 'async for' statement and it's easy to understand what it does if you spend an hour writing async/await code. 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