mirror of
https://github.com/python/cpython.git
synced 2025-11-03 19:34:08 +00:00
and unicode Patch by Christopher Blunck.
This commit is contained in:
parent
a2e303c32d
commit
5d5e7c0e34
1 changed files with 2 additions and 2 deletions
|
|
@ -1620,7 +1620,7 @@ string_index(PyStringObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (result == -1) {
|
if (result == -1) {
|
||||||
PyErr_SetString(PyExc_ValueError,
|
PyErr_SetString(PyExc_ValueError,
|
||||||
"substring not found in string.index");
|
"substring not found");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return PyInt_FromLong(result);
|
return PyInt_FromLong(result);
|
||||||
|
|
@ -1659,7 +1659,7 @@ string_rindex(PyStringObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (result == -1) {
|
if (result == -1) {
|
||||||
PyErr_SetString(PyExc_ValueError,
|
PyErr_SetString(PyExc_ValueError,
|
||||||
"substring not found in string.rindex");
|
"substring not found");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
return PyInt_FromLong(result);
|
return PyInt_FromLong(result);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue