summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/tupleobject.c')
-rw-r--r--Objects/tupleobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index 6f3711f..c85b35a 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -620,8 +620,9 @@ tuplesubscript(PyTupleObject* self, PyObject* item)
}
}
else {
- PyErr_SetString(PyExc_TypeError,
- "tuple indices must be integers");
+ PyErr_Format(PyExc_TypeError,
+ "tuple indices must be integers, not %.200s",
+ item->ob_type->tp_name);
return NULL;
}
}