summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-08-23 14:11:35 +0000
committerGuido van Rossum <guido@python.org>2002-08-23 14:11:35 +0000
commitb20cd9703941aa5f8df909e33ea6a25f91011f1d (patch)
treedae4541de0f4e8ea9874adcae819989a201fb61e
parent9a6bc502ff94f871e2cb4b1046c7e7f5411ddf65 (diff)
downloadcpython-b20cd9703941aa5f8df909e33ea6a25f91011f1d.tar.gz
The error messages in err_args() -- which is only called when the
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.
-rw-r--r--Python/ceval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 3b984c8115..d4be04e4e4 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -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);
}