diff Python/ceval.c @ 24978:b1ab4e8d7d9c legacy-trunk

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.
author Guido van Rossum <guido@python.org>
date Fri, 23 Aug 2002 14:11:35 +0000
parents e3d96e00dc6c
children be2868a63ed5
line wrap: on
line diff
--- a/Python/ceval.c	Fri Aug 23 08:40:42 2002 +0000
+++ b/Python/ceval.c	Fri Aug 23 14:11:35 2002 +0000
@@ -3176,12 +3176,12 @@
 {
 	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);
 }