commit | 283a1353a0834d53b230b22e8db9e7b4fcd220d0 | [log] [tgz] |
---|---|---|
author | Georg Brandl <georg@python.org> | Sun Nov 19 08:48:30 2006 +0000 |
committer | Georg Brandl <georg@python.org> | Sun Nov 19 08:48:30 2006 +0000 |
tree | 38cdb53e185f70ebb4c288f28b43a2dbcc39e17f | |
parent | db4f255c61d11836f734cea3329145a0f370f317 [diff] [blame] |
Patch [ 1586791 ] better error msgs for some TypeErrors
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 @@ } } 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; } }