Yury Selivanov <[email protected]> added the comment:
> I think it should be specific to generators and coroutines. Calling
> `PyObject_CallMethodIdOneArg(coro, &PyId_send, arg);` and interpreting
> exceptions to emulate the low level API seems a bit too much.
To add to my point: typically higher-level APIs go under the `PyObject_*`
namespace, whereas `Py{Type}_*` is more concrete. So I'd make `PyGen_Send` to
only work with `PyGen` and `PyCoro`.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue41756>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com