From 7d1483cbadbe48620964348a2039690624e7dc8e Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Sun, 20 Nov 2011 10:38:53 -0800 Subject: [PATCH] Make an error message more understandable and consistent with other error messages. --- Objects/abstract.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/abstract.c b/Objects/abstract.c index 1e79ddf4a35..81c19e179f9 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