summaryrefslogtreecommitdiffstats
path: root/Objects/floatobject.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-10-24 19:57:45 (GMT)
committerFred Drake <fdrake@acm.org>2000-10-24 19:57:45 (GMT)
commit661ea26b3d8621ad0acc0ed2f2036ab29355f8ff (patch)
treefcfe10c4656a3e18911cd3b41b7d8c942d707786 /Objects/floatobject.c
parentbd6f4fba1bc66a18cc15d50ffdd33faedff5ac4c (diff)
downloadcpython-661ea26b3d8621ad0acc0ed2f2036ab29355f8ff.zip
cpython-661ea26b3d8621ad0acc0ed2f2036ab29355f8ff.tar.gz
cpython-661ea26b3d8621ad0acc0ed2f2036ab29355f8ff.tar.bz2
Ka-Ping Yee <ping@lfw.org>:
Changes to error messages to increase consistency & clarity. This (mostly) closes SourceForge patch #101839.
Diffstat (limited to 'Objects/floatobject.c')
-rw-r--r--Objects/floatobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index d776147..b58c7fd 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -466,7 +466,7 @@ float_pow(PyFloatObject *v, PyObject *w, PyFloatObject *z)
if (iv == 0.0) {
if (iw < 0.0) {
PyErr_SetString(PyExc_ZeroDivisionError,
- "0.0 to a negative power");
+ "0.0 cannot be raised to a negative power");
return NULL;
}
return PyFloat_FromDouble(0.0);
@@ -486,7 +486,7 @@ float_pow(PyFloatObject *v, PyObject *w, PyFloatObject *z)
/* Sort out special cases here instead of relying on pow() */
if (iv < 0.0) {
PyErr_SetString(PyExc_ValueError,
- "negative number to a float power");
+ "negative number cannot be raised to a fractional power");
return NULL;
}
errno = 0;