Commit 688b29a5 authored by Skip Montanaro's avatar Skip Montanaro

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

strings or numbers
parent 67da4ec6
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment