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.
{
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);
}