Improve error message for "float modulo by zero" (#111685)

This commit is contained in:
Pavel Ovchinnikov 2023-11-09 22:43:58 +03:00 committed by GitHub
parent a5f29c9faf
commit 0c61d028be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -646,7 +646,7 @@ float_rem(PyObject *v, PyObject *w)
CONVERT_TO_DOUBLE(w, wx);
if (wx == 0.0) {
PyErr_SetString(PyExc_ZeroDivisionError,
"float modulo");
"float modulo by zero");
return NULL;
}
mod = fmod(vx, wx);