From 7588b8b355d81e21ea3d38cdf6b95f27fafa5be6 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 21 Mar 2010 21:22:12 +0000 Subject: [PATCH] nest if for clarity --- Python/ceval.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Python/ceval.c b/Python/ceval.c index 0bd785b57c0..4e8557df9a3 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",