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/139456.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()Yury Selivanov yselivanov.ml at gmail.com
Thu Apr 23 17:54:06 CEST 2015
Hi Victor,

On 2015-04-23 4:43 AM, Victor Stinner wrote:
[...]
>  From my understanding, the PEP 3151 simply does not support
> asyncio.Future. Am I right?
>

Greg wants to implement __cocall__ on futures.  This way
you'll be able to write

    cocall fut()  # instead of "await fut"

So you *will have to* use "()"


Another problem is functions that return future:

def do_something():
     ...
     return fut

With Greg's idea to call it you would do:

    cocall (do_something())()

That means that you can't refactor your "do_something"
function and make it a coroutine.

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