diff options
-rw-r--r-- | Doc/c-api/exceptions.rst | 7 | ||||
-rw-r--r-- | Doc/tutorial/floatingpoint.rst | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Doc/c-api/exceptions.rst b/Doc/c-api/exceptions.rst index d3f9135b17..4482cd0bd7 100644 --- a/Doc/c-api/exceptions.rst +++ b/Doc/c-api/exceptions.rst @@ -291,9 +291,10 @@ is a separate error indicator for each thread. .. cfunction:: void PyErr_BadInternalCall() - This is a shorthand for ``PyErr_SetString(PyExc_TypeError, message)``, where - *message* indicates that an internal operation (e.g. a Python/C API function) - was invoked with an illegal argument. It is mostly for internal use. + This is a shorthand for ``PyErr_SetString(PyExc_SystemError, message)``, + where *message* indicates that an internal operation (e.g. a Python/C API + function) was invoked with an illegal argument. It is mostly for internal + use. .. cfunction:: int PyErr_WarnEx(PyObject *category, char *message, int stacklevel) diff --git a/Doc/tutorial/floatingpoint.rst b/Doc/tutorial/floatingpoint.rst index 6ff2160217..29c7a660e7 100644 --- a/Doc/tutorial/floatingpoint.rst +++ b/Doc/tutorial/floatingpoint.rst @@ -157,7 +157,7 @@ Why is that? 1/10 is not exactly representable as a binary fraction. Almost all machines today (November 2000) use IEEE-754 floating point arithmetic, and almost all platforms map Python floats to IEEE-754 "double precision". 754 doubles contain 53 bits of precision, so on input the computer strives to -convert 0.1 to the closest fraction it can of the form *J*/2\*\**N* where *J* is +convert 0.1 to the closest fraction it can of the form *J*/2**\ *N* where *J* is an integer containing exactly 53 bits. Rewriting :: 1 / 10 ~= J / (2**N) |