[Python-Dev] PEP 3152 and yield from Future() (original) (raw)
Yury Selivanov yselivanov.ml at gmail.com
Thu Apr 23 17:54:06 CEST 2015
- Previous message (by thread): [Python-Dev] PEP 3152 and yield from Future()
- Next message (by thread): [Python-Dev] PEP 3152 and yield from Future()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message (by thread): [Python-Dev] PEP 3152 and yield from Future()
- Next message (by thread): [Python-Dev] PEP 3152 and yield from Future()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]