A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-November/150866.html below:

[Python-Dev] Using async/await in place of yield expression

[Python-Dev] Using async/await in place of yield expression [Python-Dev] Using async/await in place of yield expressionYury Selivanov yselivanov.ml at gmail.com
Sun Nov 26 23:53:44 EST 2017
On Sun, Nov 26, 2017 at 11:23 PM, Caleb Hattingh
<caleb.hattingh at gmail.com> wrote:
[..]
> I'd be very grateful if anyone can point out if my understanding of the
> above is incorrect.  Private email is fine if you prefer not to post to the
> list.

It is correct.  While 'yield from coro()', where 'coro()' is an 'async
def' coroutine would make sense in some contexts, it would require
coroutines to implement the iteration protocol.  That would mean that
you could write 'for x in coro()', which is meaningless for coroutines
in all contexts.  Therefore, coroutines do not implement the iterator
protocol.

Yury
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4