clarify message when raising TypeError to indicate that float() accepts

strings or numbers
This commit is contained in:
Skip Montanaro 2002-05-02 13:03:22 +00:00
parent c6a7d7ef49
commit 71390a9a94
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ PyFloat_FromString(PyObject *v, char **pend)
#endif
else if (PyObject_AsCharBuffer(v, &s, &len)) {
PyErr_SetString(PyExc_TypeError,
"float() needs a string argument");
"float() argument must be a string or a number");
return NULL;
}