From: Skip Montanaro Date: Thu, 2 May 2002 13:03:22 +0000 (+0000) Subject: clarify message when raising TypeError to indicate that float() accepts X-Git-Tag: v2.3c1~5749 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=71390a9a941c3c84ee48afde6445d4d65396b137;p=thirdparty%2FPython%2Fcpython.git clarify message when raising TypeError to indicate that float() accepts strings or numbers --- diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 83987baa6b20..5fd13bcc1e83 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -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; }