From: Raymond Hettinger Date: Sun, 12 May 2002 17:20:38 +0000 (+0000) Subject: Close SF bug 551673. Backport Skip Montanaro's checkin of 2.112. X-Git-Tag: v2.2.2b1~377 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db581dfb02a3536568f21dae1f1eede3c12ef4e3;p=thirdparty%2FPython%2Fcpython.git Close SF bug 551673. Backport Skip Montanaro's checkin of 2.112. Clarifies 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; }