summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2010-02-22 16:34:50 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2010-02-22 16:34:50 (GMT)
commit50363262b286aa4e5a8252ba2b63dca79d259b97 (patch)
tree0a456521be31d1bc6054a07bfc9eb5add969a40e /Objects
parent19e4acfa15ec17a748b26770078aad53aa72475f (diff)
downloadcpython-50363262b286aa4e5a8252ba2b63dca79d259b97.zip
cpython-50363262b286aa4e5a8252ba2b63dca79d259b97.tar.gz
cpython-50363262b286aa4e5a8252ba2b63dca79d259b97.tar.bz2
Merged revisions 78319 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r78319 | ezio.melotti | 2010-02-22 18:30:58 +0200 (Mon, 22 Feb 2010) | 1 line #7482: clarify error message in case of division by zero of float and complex numbers. ........
Diffstat (limited to 'Objects')
-rw-r--r--Objects/complexobject.c2
-rw-r--r--Objects/floatobject.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 7318367..4821d1e 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -504,7 +504,7 @@ complex_div(PyObject *v, PyObject *w)
quot = c_quot(a, b);
PyFPE_END_PROTECT(quot)
if (errno == EDOM) {
- PyErr_SetString(PyExc_ZeroDivisionError, "complex division");
+ PyErr_SetString(PyExc_ZeroDivisionError, "complex division by zero");
return NULL;
}
return PyComplex_FromCComplex(quot);
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 33196ff..238022b 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -570,7 +570,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