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/2015-April/139479.html below:

[Python-Dev] PEP 3152 and yield from Future()

[Python-Dev] PEP 3152 and yield from Future() [Python-Dev] PEP 3152 and yield from Future()Greg Ewing greg.ewing at canterbury.ac.nz
Fri Apr 24 02:33:26 CEST 2015
andrew.svetlov at gmail.com wrote:
> I can live with `cocall fut()` but the difference between `data = yield 
> from loop.sock_recv(sock, 1024)` and `data = cocall 
> (loop.sock_recv(sock, 1024))()` frustrates me very much.

That's not the way it would be done. In a PEP-3152-ified
version of asyncio, sock_recv would be a cofunction, so
that would be just

    data = cocall loop.sock_recv(sock, 1024)

-- 
Greg
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