Kaydet (Commit) c4352b06 authored tarafından Mark Dickinson's avatar Mark Dickinson

Issue 2801: fix bug in float.is_integer where ValueError was incorrectly

raised.
üst b27406c0
......@@ -12,6 +12,9 @@ What's new in Python 3.0b1?
Core and Builtins
-----------------
- Issue 2801: fix bug in the float.is_integer method where a ValueError
was sometimes incorrectly raised.
Extension Modules
-----------------
......
......@@ -900,6 +900,7 @@ float_is_integer(PyObject *v)
return NULL;
if (!Py_IS_FINITE(x))
Py_RETURN_FALSE;
errno = 0;
PyFPE_START_PROTECT("is_integer", return NULL)
o = (floor(x) == x) ? Py_True : Py_False;
PyFPE_END_PROTECT(x)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment