Message258058
| Author |
martin.panter |
| Recipients |
asvetlov, brett.cannon, gvanrossum, martin.panter, ncoghlan, vstinner, yselivanov |
| Date |
2016年01月12日.02:25:47 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1452565547.47.0.250186620087.issue25887@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
If the coroutine-iterator is going to raise RuntimeError rather than StopIteration, do you think the __await__() documentation <https://docs.python.org/dev/reference/datamodel.html#object.__await__> should be clarified?
IMO "yield from coroutine_iterator" might be plausable for some strange combination of 3.4 code and a 3.5 coroutine, but I think it would be rare. And if you added a check in __await__() then the using "await" wouldn’t need to rely on next() raising the RuntimeError. |
|