mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#7482: clarify error message in case of division by zero of float and complex numbers.
This commit is contained in:
parent
38c123651c
commit
bce3e17bd2
2 changed files with 4 additions and 4 deletions
|
@ -668,7 +668,7 @@ float_div(PyObject *v, PyObject *w)
|
|||
#ifdef Py_NAN
|
||||
if (b == 0.0) {
|
||||
PyErr_SetString(PyExc_ZeroDivisionError,
|
||||
"float division");
|
||||
"float division by zero");
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
@ -690,7 +690,7 @@ float_classic_div(PyObject *v, PyObject *w)
|
|||
#ifdef Py_NAN
|
||||
if (b == 0.0) {
|
||||
PyErr_SetString(PyExc_ZeroDivisionError,
|
||||
"float division");
|
||||
"float division by zero");
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue