summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-05-02 13:03:22 (GMT)
committerSkip Montanaro <skip@pobox.com>2002-05-02 13:03:22 (GMT)
commit71390a9a941c3c84ee48afde6445d4d65396b137 (patch)
tree7b0d134711b9030303f77581f0c0bcda286f970c /Objects/floatobject.c
parentc6a7d7ef496995a29a163c2c72ec749c85274b72 (diff)
downloadcpython-71390a9a941c3c84ee48afde6445d4d65396b137.zip
cpython-71390a9a941c3c84ee48afde6445d4d65396b137.tar.gz
cpython-71390a9a941c3c84ee48afde6445d4d65396b137.tar.bz2
clarify message when raising TypeError to indicate that float() accepts
strings or numbers
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c2
1 files changed, 1 insertions, 1 deletions
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 @@ 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;
}