SF patch #664192 bug #661913: inconsistent error messages between string
and unicode
Patch by Christopher Blunck.
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 1a4a754..f18edb0 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -1620,7 +1620,7 @@
return NULL;
if (result == -1) {
PyErr_SetString(PyExc_ValueError,
- "substring not found in string.index");
+ "substring not found");
return NULL;
}
return PyInt_FromLong(result);
@@ -1659,7 +1659,7 @@
return NULL;
if (result == -1) {
PyErr_SetString(PyExc_ValueError,
- "substring not found in string.rindex");
+ "substring not found");
return NULL;
}
return PyInt_FromLong(result);