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

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Apr 24 11:07:33 CEST 2015


Paul Moore wrote:
> On 24 April 2015 at 09:34, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 
>>   cocall await(cocall f(x))
>>
>>That doesn't look so bad to me.
> 
> I've not been following this discussion (and coroutines make my head
> hurt) but this idiom looks like it's bound to result in people getting
> the idea that you scatter "cocall" throughout an expression until you
> get it to work.

They won't need to do that, because they'll get told
exactly where they've left one out, or put one in that
they shouldn't have.

Also, the places you need to put cocall are exactly
the same as the places you need yield-from currently,
or await under PEP 492.

-- 
Greg


More information about the Python-Dev mailing list