summaryrefslogtreecommitdiffstats
path: root/Objects/tupleobject.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-11-19 08:48:30 (GMT)
committerGeorg Brandl <georg@python.org>2006-11-19 08:48:30 (GMT)
commit283a1353a0834d53b230b22e8db9e7b4fcd220d0 (patch)
tree38cdb53e185f70ebb4c288f28b43a2dbcc39e17f /Objects/tupleobject.c
parentdb4f255c61d11836f734cea3329145a0f370f317 (diff)
downloadcpython-283a1353a0834d53b230b22e8db9e7b4fcd220d0.zip
cpython-283a1353a0834d53b230b22e8db9e7b4fcd220d0.tar.gz
cpython-283a1353a0834d53b230b22e8db9e7b4fcd220d0.tar.bz2
Patch [ 1586791 ] better error msgs for some TypeErrors
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;
}
}