Message244315
Stefan,
This patch should solve the problem with types.coroutine accepting only pure python generator functions.
The approach is, however, slightly different from what you've proposed. Instead of having a wrapper class (delegating .throw, .send etc to a wrapped object), we now simply check if the returned value of the wrapped function is an instance of collections.abc.Coroutine. Issue 24315 enables duck typing for coroutines, so if a cython-based coroutine implements all coroutine abstract methods, it will automatically pass types.coroutine. |
|
| Date |
User |
Action |
Args |
| 2015-05-28 16:31:52 | yselivanov | set | recipients:
+ yselivanov, gvanrossum, ncoghlan, scoder |
| 2015-05-28 16:31:52 | yselivanov | set | messageid: <[email protected]> |
| 2015-05-28 16:31:52 | yselivanov | link | issue24316 messages |
| 2015-05-28 16:31:52 | yselivanov | create | |
|