mirror of
https://github.com/python/cpython.git
synced 2025-09-01 14:38:00 +00:00
fix yield from return value on custom iterators (closes #15568)
This commit is contained in:
parent
a0abb4404a
commit
b37df519c7
3 changed files with 18 additions and 1 deletions
|
@ -1843,7 +1843,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
|
|||
} else {
|
||||
_Py_IDENTIFIER(send);
|
||||
if (u == Py_None)
|
||||
retval = PyIter_Next(x);
|
||||
retval = Py_TYPE(x)->tp_iternext(x);
|
||||
else
|
||||
retval = _PyObject_CallMethodId(x, &PyId_send, "O", u);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue