From: Benjamin Peterson Date: Sun, 21 Mar 2010 19:24:08 +0000 (+0000) Subject: flatten condition X-Git-Tag: v2.7b1~275 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=56472c2463ce12830a580af3159cba3437666677;p=python flatten condition --- diff --git a/Python/ceval.c b/Python/ceval.c index 1aa87a8d94..c0c0068807 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. */