fix yield from return value on custom iterators (closes #15568)

This commit is contained in:
Benjamin Peterson 2012-08-06 17:53:09 -07:00
parent a0abb4404a
commit b37df519c7
3 changed files with 18 additions and 1 deletions

View file

@ -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);
}