Python/ceval.c
static void
save_exc_state(PyThreadState *tstate, PyFrameObject *f)
{
    PyObject *type, *value, *traceback;
    Py_XINCREF(tstate->exc_type);
    Py_XINCREF(tstate->exc_value);
    Py_XINCREF(tstate->exc_traceback);
    type = f->f_exc_type;
    value = f->f_exc_value;
    traceback = f->f_exc_traceback;
    f->f_exc_type = tstate->exc_type;
    f->f_exc_value = tstate->exc_value;
    f->f_exc_traceback = tstate->exc_traceback;
    Py_XDECREF(type);
    Py_XDECREF(value);
    Py_XDECREF(traceback);
}
/* These 3 functions deal with the exception state of generators. */
These 3 functions deal with the exception state of generators.
These 3 functions deal with the exception state of generators .
static void
save_exc_state(PyThreadState *tstate, PyFrameObject *f)
{
    PyObject *type, *value, *traceback;
    Py_XINCREF(tstate->exc_type);
    Py_XINCREF(tstate->exc_value);
    Py_XINCREF(tstate->exc_traceback);
    type = f->f_exc_type;
    value = f->f_exc_value;
    traceback = f->f_exc_traceback;
    f->f_exc_type = tstate->exc_type;
    f->f_exc_value = tstate->exc_value;
    f->f_exc_traceback = tstate->exc_traceback;
    Py_XDECREF(type);
    Py_XDECREF(value);
    Py_XDECREF(traceback);
}
static void save_exc_state ( PyThreadState * tstate , PyFrameObject * f ) { PyObject * type , * value , * traceback ; Py_XINCREF ( tstate -> exc_type ) ; Py_XINCREF ( tstate -> exc_value ) ; Py_XINCREF ( tstate -> exc_traceback ) ; type = f -> f_exc_type ; value = f -> f_exc_value ; traceback = f -> f_exc_traceback ; f -> f_exc_type = tstate -> exc_type ; f -> f_exc_value = tstate -> exc_value ; f -> f_exc_traceback = tstate -> exc_traceback ; Py_XDECREF ( type ) ; Py_XDECREF ( value ) ; Py_XDECREF ( traceback ) ; }
These 3 functions deal with the exception state of generators.
These 3 functions deal with the exception state of generators .