diff options
author | Benjamin Peterson <benjamin@python.org> | 2010-03-21 21:22:12 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2010-03-21 21:22:12 +0000 |
commit | 32d30b04ab6ca4963988581ce5a84782aaa2cec3 (patch) | |
tree | 474fb1ea7ac6a85533e57237be225eb06a4bd062 /Python/ceval.c | |
parent | 8095c719c74f3355af9e551f26f9475c77c22908 (diff) | |
download | cpython-32d30b04ab6ca4963988581ce5a84782aaa2cec3.tar.gz |
nest if for clarity
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 0bd785b57c..4e8557df9a 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3155,17 +3155,17 @@ PyEval_EvalCodeEx(PyCodeObject *co, PyObject *globals, PyObject *locals, } if (co->co_kwonlyargcount > 0) { for (i = co->co_argcount; i < total_args; i++) { - PyObject *name, *def; + PyObject *name; if (GETLOCAL(i) != NULL) continue; name = PyTuple_GET_ITEM(co->co_varnames, i); - def = NULL; - if (kwdefs != NULL) - def = PyDict_GetItem(kwdefs, name); - if (def != NULL) { - Py_INCREF(def); - SETLOCAL(i, def); - continue; + if (kwdefs != NULL) { + PyObject *def = PyDict_GetItem(kwdefs, name); + if (def) { + Py_INCREF(def); + SETLOCAL(i, def); + continue; + } } PyErr_Format(PyExc_TypeError, "%U() needs keyword-only argument %S", |