Python/ceval.c
PyObject *
PyEval_CallObjectWithKeywords(PyObject *func, PyObject *args, PyObject *kwargs)
{
#ifdef Py_DEBUG
    /* PyEval_CallObjectWithKeywords() must not be called with an exception
       set. It raises a new exception if parameters are invalid or if
       PyTuple_New() fails, and so the original exception is lost. */
    assert(!PyErr_Occurred());
#endif

    if (args != NULL && !PyTuple_Check(args)) {
        PyErr_SetString(PyExc_TypeError,
                        "argument list must be a tuple");
        return NULL;
    }

    if (kwargs != NULL && !PyDict_Check(kwargs)) {
        PyErr_SetString(PyExc_TypeError,
                        "keyword list must be a dictionary");
        return NULL;
    }

    if (args == NULL) {
        return _PyObject_FastCallDict(func, NULL, 0, kwargs);
    }
    else {
        return PyObject_Call(func, args, kwargs);
    }
}
/* External interface to call any callable object.
   The arg must be a tuple or NULL.  The kw must be a dict or NULL. */
External interface to call any callable object.
The arg must be a tuple or NULL.  The kw must be a dict or NULL.
External interface to call any callable object . The arg must be a tuple or NULL . The kw must be a dict or NULL .
PyObject *
PyEval_CallObjectWithKeywords(PyObject *func, PyObject *args, PyObject *kwargs)
{
#ifdef Py_DEBUG
    assert(!PyErr_Occurred());
#endif
    if (args != NULL && !PyTuple_Check(args)) {
        PyErr_SetString(PyExc_TypeError,
                        "argument list must be a tuple");
        return NULL;
    }
    if (kwargs != NULL && !PyDict_Check(kwargs)) {
        PyErr_SetString(PyExc_TypeError,
                        "keyword list must be a dictionary");
        return NULL;
    }
    if (args == NULL) {
        return _PyObject_FastCallDict(func, NULL, 0, kwargs);
    }
    else {
        return PyObject_Call(func, args, kwargs);
    }
}
PyObject * PyEval_CallObjectWithKeywords ( PyObject * func , PyObject * args , PyObject * kwargs ) { #ifdef Py_DEBUG assert ( ! PyErr_Occurred ( ) ) ; #endif if ( args != NULL && ! PyTuple_Check ( args ) ) { PyErr_SetString ( PyExc_TypeError , " " ) ; return NULL ; } if ( kwargs != NULL && ! PyDict_Check ( kwargs ) ) { PyErr_SetString ( PyExc_TypeError , " " ) ; return NULL ; } if ( args == NULL ) { return _PyObject_FastCallDict ( func , NULL , 0 , kwargs ) ; } else { return PyObject_Call ( func , args , kwargs ) ; } }
External interface to call any callable object.
External interface to call any callable object .
/* PyEval_CallObjectWithKeywords() must not be called with an exception
       set. It raises a new exception if parameters are invalid or if
       PyTuple_New() fails, and so the original exception is lost. */