[Python-checkins] python/dist/src/Objects floatobject.c,2.111,2.112
montanaro@sourceforge.net
montanaro@sourceforge.net
Thu, 02 May 2002 06:03:25 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv29623
Modified Files:
floatobject.c
Log Message:
clarify message when raising TypeError to indicate that float() accepts
strings or numbers
Index: floatobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v
retrieving revision 2.111
retrieving revision 2.112
diff -C2 -d -r2.111 -r2.112
*** floatobject.c 9 Mar 2002 04:58:24 -0000 2.111
--- floatobject.c 2 May 2002 13:03:22 -0000 2.112
***************
*** 124,128 ****
else if (PyObject_AsCharBuffer(v, &s, &len)) {
PyErr_SetString(PyExc_TypeError,
! "float() needs a string argument");
return NULL;
}
--- 124,128 ----
else if (PyObject_AsCharBuffer(v, &s, &len)) {
PyErr_SetString(PyExc_TypeError,
! "float() argument must be a string or a number");
return NULL;
}