Message245529
| Author |
yselivanov |
| Recipients |
Ben.Darnell, Yury.Selivanov, asvetlov, gvanrossum, martin.panter, ncoghlan, scoder, vstinner, yselivanov |
| Date |
2015年06月19日.22:04:05 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1434751446.19.0.0401880166153.issue24400@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Actually, I'm not sure that we should use 'cr_*' prefix instead of 'gi_*' for coroutines.
Coroutines reusing generators machinery is a two-fold thing: on the one hand it makes the implementation simpler; on the other -- __await__ must return an *iterator*. If you want to push values into __await__, it must return a *generator*. Essentially, as Guido said in one of his emails, we should see PEP 492 as a refinement of 'yield from' and existing generator-based coroutines. I love the idea of separating types for coroutines and generators, but I'm not so sure about 'cr_*' prefix.
Nick, Guido, what do you think about this? |
|