From: Raymond Hettinger Date: Sun, 20 Nov 2011 18:38:53 +0000 (-0800) Subject: Make an error message more understandable and consistent with other error messages. X-Git-Tag: v2.7.3rc1~290 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7d1483cbadbe48620964348a2039690624e7dc8e;p=thirdparty%2FPython%2Fcpython.git Make an error message more understandable and consistent with other error messages. --- diff --git a/Objects/abstract.c b/Objects/abstract.c index 1e79ddf4a35b..81c19e179f99 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -156,7 +156,7 @@ PyObject_GetItem(PyObject *o, PyObject *key) "be integer, not '%.200s'", key); } - return type_error("'%.200s' object is not subscriptable", o); + return type_error("'%.200s' object has no attribute '__getitem__'", o); } int