mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-128078: Clear exception in anext
before calling _PyGen_SetStopIterationValue
(#128780)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
parent
517dc65ffc
commit
76ffaef729
4 changed files with 22 additions and 0 deletions
|
@ -633,6 +633,7 @@ gen_iternext(PyObject *self)
|
|||
int
|
||||
_PyGen_SetStopIterationValue(PyObject *value)
|
||||
{
|
||||
assert(!PyErr_Occurred());
|
||||
PyObject *e;
|
||||
|
||||
if (value == NULL ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue