[Python-checkins] python/dist/src/Objects floatobject.c,2.110.6.1,2.110.6.2
rhettinger@sourceforge.net
rhettinger@sourceforge.net
Sun, 12 May 2002 10:20:41 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv30199
Modified Files:
Tag: release22-maint
floatobject.c
Log Message:
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.
Index: floatobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v
retrieving revision 2.110.6.1
retrieving revision 2.110.6.2
diff -C2 -d -r2.110.6.1 -r2.110.6.2
*** floatobject.c 11 Mar 2002 10:17:17 -0000 2.110.6.1
--- floatobject.c 12 May 2002 17:20:38 -0000 2.110.6.2
***************
*** 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;
}