]> granicus.if.org Git - python/commitdiff
flatten condition
authorBenjamin Peterson <benjamin@python.org>
Sun, 21 Mar 2010 19:24:08 +0000 (19:24 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sun, 21 Mar 2010 19:24:08 +0000 (19:24 +0000)
Python/ceval.c

index 1aa87a8d94231506f1b3077baffbf7be4f188aff..c0c00688074410484e6636614e848c71357c0d0a 100644 (file)
@@ -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. */