Vladimir Matveev <desco...@gmail.com> added the comment:

so to summarize:

Proposed function signature:
```
PySendResult PyIter_Send(PyObject *obj, PyObject *arg, PyObject **result);
```

For generators/coroutines function will delegate to specialized implementation 
that does not raise StopIteration exception
For types that provide `tp_iternext` if arg is Py_None function call invoke 
`Py_TYPE(obj)->tp_iternext(obj)`
For all other cases function will try to call `send` method

Regarding of the case function will not raise StopIteration and will always 
return pair status/result.

Does it sound correct?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41756>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to