diff Objects/floatobject.c @ 23422:f38bdb2fcae0 2.2

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.
author Raymond Hettinger <python@rcn.com>
date Sun, 12 May 2002 17:20:38 +0000
parents 4b6eda7d0c8f
children 36f71fef5b10 ed1ba37a46b7
line wrap: on
line diff
--- a/Objects/floatobject.c	Sat May 11 03:37:15 2002 +0000
+++ b/Objects/floatobject.c	Sun May 12 17:20:38 2002 +0000
@@ -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;
 	}