]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Make an error message more understandable and consistent with other error messages.
authorRaymond Hettinger <python@rcn.com>
Sun, 20 Nov 2011 18:38:53 +0000 (10:38 -0800)
committerRaymond Hettinger <python@rcn.com>
Sun, 20 Nov 2011 18:38:53 +0000 (10:38 -0800)
Objects/abstract.c

index 1e79ddf4a35be7e583b50064e83a570c1dab507c..81c19e179f995b69def8f08e56a9e69ef6a1ecdb 100644 (file)
@@ -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