]> granicus.if.org Git - python/commitdiff
The error messages in err_args() -- which is only called when the
authorGuido van Rossum <guido@python.org>
Fri, 23 Aug 2002 14:11:35 +0000 (14:11 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 23 Aug 2002 14:11:35 +0000 (14:11 +0000)
required number of args is 0 or 1 -- were reversed.  Also change "1"
into "exactly one", the same words as used elsewhere for this
condition.

Python/ceval.c

index 3b984c8115dd50c285928c53ac3b5b81ef9562e5..d4be04e4e45b957de464a547a0cf58bada91dd4b 100644 (file)
@@ -3176,12 +3176,12 @@ err_args(PyObject *func, int flags, int nargs)
 {
        if (flags & METH_NOARGS)
                PyErr_Format(PyExc_TypeError, 
-                            "%.200s() takes 1 argument (%d given)",
+                            "%.200s() takes no arguments (%d given)",
                             ((PyCFunctionObject *)func)->m_ml->ml_name, 
                             nargs);
        else
                PyErr_Format(PyExc_TypeError, 
-                            "%.200s() takes no arguments (%d given)",
+                            "%.200s() takes exactly one argument (%d given)",
                             ((PyCFunctionObject *)func)->m_ml->ml_name, 
                             nargs);
 }