[Python-Dev] PEP 3152 and yield from Future() (original) (raw)
Yury Selivanov yselivanov.ml at gmail.com
Thu Apr 23 18:13:14 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 ]
On 2015-04-23 11:26 AM, Victor Stinner wrote:
2015-04-23 17:22 GMT+02:00 <andrew.svetlov at gmail.com>:
I can live with
cocall fut()
but the difference betweendata = yield from_ _loop.sockrecv(sock, 1024)
anddata = cocall (loop.sockrecv(sock,_ _1024))()
frustrates me very much. You didn't answer to my question. My question is: is it possible to implement Future.cocall() since yield is defined in cofunctions. If it's possible, can you please show how? (Show me the code!)
I can do that.
class Future: .... def iter(self): .... cocall = iter
I've outlined the problem with this approach in parallel email: https://mail.python.org/pipermail/python-dev/2015-April/139456.html
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 ]