cpython: ef0110a52e24 (original) (raw)
Mercurial > cpython
changeset 102845:ef0110a52e24
PyEval_CallObjectWithKeywords() uses fast call with kwargs Issue #27809. _PyObject_FastCallDict() now supports keyword arguments, and so the args==NULL fast-path can also be used when kwargs is not NULL. [#27809]
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Mon, 22 Aug 2016 23:26:00 +0200 |
parents | 15eab21bf934 |
children | 5587d0dfab4c |
files | Python/ceval.c |
diffstat | 1 files changed, 4 insertions(+), 12 deletions(-)[+] [-] Python/ceval.c 16 |
line wrap: on
line diff
--- a/Python/ceval.c +++ b/Python/ceval.c @@ -4590,30 +4590,22 @@ PyEval_CallObjectWithKeywords(PyObject * #endif if (args == NULL) {
if (kwargs == NULL) {[](#l1.7)
return _PyObject_CallNoArg(func);[](#l1.8)
}[](#l1.9)
args = PyTuple_New(0);[](#l1.11)
if (args == NULL)[](#l1.12)
return NULL;[](#l1.13)
- if (!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");