| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
If the decimal-to-binary conversion inside round(float, ndigits) runs out of memory, it returns a -1.0 error sentinel and sets errno to ENOMEM. Ignoring that error can return -1.0 as a seemingly successful rounded value. Raise MemoryError instead. Backport to 3.15 and 3.14.
| _Py_SET_53BIT_PRECISION_END; | ||
| if (errno == ERANGE && fabs(rounded) >= 1.) | ||
| if (errno == ENOMEM) | ||
| PyErr_NoMemory(); |
There was a problem hiding this comment.
Can we follow PEP 7 please?
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
If the decimal-to-binary conversion inside round(float, ndigits) runs out of memory, it returns a -1.0 error sentinel and sets errno to ENOMEM. Ignoring that error can return -1.0 as a seemingly successful rounded value. Raise MemoryError instead. Backport to 3.15 and 3.14.