commit | 71390a9a941c3c84ee48afde6445d4d65396b137 | [log] [tgz] |
---|---|---|
author | Skip Montanaro <skip@pobox.com> | Thu May 02 13:03:22 2002 +0000 |
committer | Skip Montanaro <skip@pobox.com> | Thu May 02 13:03:22 2002 +0000 |
tree | 7b0d134711b9030303f77581f0c0bcda286f970c | |
parent | c6a7d7ef496995a29a163c2c72ec749c85274b72 [diff] |
clarify message when raising TypeError to indicate that float() accepts strings or numbers
diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 83987ba..5fd13bc 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c
@@ -123,7 +123,7 @@ #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; }