mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Don't confound Neil S on b"a"[0] = b"b".
This commit is contained in:
parent
5e0af3c3be
commit
032a284752
1 changed files with 2 additions and 2 deletions
|
|
@ -805,7 +805,7 @@ PyNumber_Index(PyObject *item)
|
|||
if (result &&
|
||||
!PyInt_Check(result) && !PyLong_Check(result)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"__index__ returned non-int " \
|
||||
"__index__ returned non-int "
|
||||
"(type %.200s)",
|
||||
result->ob_type->tp_name);
|
||||
Py_DECREF(result);
|
||||
|
|
@ -815,7 +815,7 @@ PyNumber_Index(PyObject *item)
|
|||
else {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"'%.200s' object cannot be interpreted "
|
||||
"as an index", item->ob_type->tp_name);
|
||||
"as an integer", item->ob_type->tp_name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue