[Python-checkins] python/dist/src/Python ceval.c,2.331,2.332
gvanrossum@users.sourceforge.net
gvanrossum@users.sourceforge.net
Fri, 23 Aug 2002 07:11:39 -0700
Update of /cvsroot/python/python/dist/src/Python
In directory usw-pr-cvs1:/tmp/cvs-serv31128
Modified Files:
ceval.c
Log Message:
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.
Index: ceval.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/ceval.c,v
retrieving revision 2.331
retrieving revision 2.332
diff -C2 -d -r2.331 -r2.332
*** ceval.c 20 Aug 2002 15:43:16 -0000 2.331
--- ceval.c 23 Aug 2002 14:11:35 -0000 2.332
***************
*** 3177,3186 ****
if (flags & METH_NOARGS)
PyErr_Format(PyExc_TypeError,
! "%.200s() takes 1 argument (%d given)",
((PyCFunctionObject *)func)->m_ml->ml_name,
nargs);
else
PyErr_Format(PyExc_TypeError,
! "%.200s() takes no arguments (%d given)",
((PyCFunctionObject *)func)->m_ml->ml_name,
nargs);
--- 3177,3186 ----
if (flags & METH_NOARGS)
PyErr_Format(PyExc_TypeError,
! "%.200s() takes no arguments (%d given)",
((PyCFunctionObject *)func)->m_ml->ml_name,
nargs);
else
PyErr_Format(PyExc_TypeError,
! "%.200s() takes exactly one argument (%d given)",
((PyCFunctionObject *)func)->m_ml->ml_name,
nargs);