mirror of
https://github.com/python/cpython.git
synced 2025-08-25 11:15:02 +00:00
merge from trunk
This commit is contained in:
parent
2d8dcdcb06
commit
f10a79aad4
40 changed files with 621 additions and 305 deletions
|
@ -1457,7 +1457,7 @@ float_as_integer_ratio(PyObject *v, PyObject *unused)
|
|||
#ifdef Py_NAN
|
||||
if (Py_IS_NAN(self)) {
|
||||
PyErr_SetString(PyExc_ValueError,
|
||||
"Cannot pass nan to float.as_integer_ratio.");
|
||||
"Cannot pass NaN to float.as_integer_ratio.");
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
@ -1516,7 +1516,7 @@ PyDoc_STRVAR(float_as_integer_ratio_doc,
|
|||
"\n"
|
||||
"Returns a pair of integers, whose ratio is exactly equal to the original\n"
|
||||
"float and with a positive denominator.\n"
|
||||
"Raises OverflowError on infinities and a ValueError on nans.\n"
|
||||
"Raises OverflowError on infinities and a ValueError on NaNs.\n"
|
||||
"\n"
|
||||
">>> (10.0).as_integer_ratio()\n"
|
||||
"(10, 1)\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue