diff options
author | Georg Brandl <georg@python.org> | 2006-11-19 08:48:30 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-11-19 08:48:30 (GMT) |
commit | 283a1353a0834d53b230b22e8db9e7b4fcd220d0 (patch) | |
tree | 38cdb53e185f70ebb4c288f28b43a2dbcc39e17f /Objects/tupleobject.c | |
parent | db4f255c61d11836f734cea3329145a0f370f317 (diff) | |
download | cpython-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.c | 5 |
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; } } |