Commit 032a2847 authored by Guido van Rossum's avatar Guido van Rossum

Don't confound Neil S on b"a"[0] = b"b".

parent 5e0af3c3
...@@ -805,7 +805,7 @@ PyNumber_Index(PyObject *item) ...@@ -805,7 +805,7 @@ PyNumber_Index(PyObject *item)
if (result && if (result &&
!PyInt_Check(result) && !PyLong_Check(result)) { !PyInt_Check(result) && !PyLong_Check(result)) {
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"__index__ returned non-int " \ "__index__ returned non-int "
"(type %.200s)", "(type %.200s)",
result->ob_type->tp_name); result->ob_type->tp_name);
Py_DECREF(result); Py_DECREF(result);
...@@ -815,7 +815,7 @@ PyNumber_Index(PyObject *item) ...@@ -815,7 +815,7 @@ PyNumber_Index(PyObject *item)
else { else {
PyErr_Format(PyExc_TypeError, PyErr_Format(PyExc_TypeError,
"'%.200s' object cannot be interpreted " "'%.200s' object cannot be interpreted "
"as an index", item->ob_type->tp_name); "as an integer", item->ob_type->tp_name);
} }
return result; return result;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment