From 56472c2463ce12830a580af3159cba3437666677 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 21 Mar 2010 19:24:08 +0000 Subject: [PATCH] flatten condition --- Python/ceval.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Python/ceval.c b/Python/ceval.c index 1aa87a8d942..c0c00688074 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3177,14 +3177,12 @@ kw_found: } } } - else { - if (argcount > 0 || kwcount > 0) { - PyErr_Format(PyExc_TypeError, - "%.200s() takes no arguments (%d given)", - PyString_AsString(co->co_name), - argcount + kwcount); - goto fail; - } + else if (argcount > 0 || kwcount > 0) { + PyErr_Format(PyExc_TypeError, + "%.200s() takes no arguments (%d given)", + PyString_AsString(co->co_name), + argcount + kwcount); + goto fail; } /* Allocate and initialize storage for cell vars, and copy free vars into frame. This isn't too efficient right now. */