mirror of
https://github.com/python/cpython.git
synced 2025-10-06 07:02:33 +00:00
This commit is contained in:
parent
aac875fa2f
commit
fa448de97d
3 changed files with 18 additions and 2 deletions
|
@ -575,8 +575,7 @@ _PyGen_SetStopIterationValue(PyObject *value)
|
|||
PyObject *e;
|
||||
|
||||
if (value == NULL ||
|
||||
(!PyTuple_Check(value) &&
|
||||
!PyObject_TypeCheck(value, (PyTypeObject *) PyExc_StopIteration)))
|
||||
(!PyTuple_Check(value) && !PyExceptionInstance_Check(value)))
|
||||
{
|
||||
/* Delay exception instantiation if we can */
|
||||
PyErr_SetObject(PyExc_StopIteration, value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue