← Back to DAGDA | Support | Source: https://github.com/python/cpython/commit/7d1483cbadbe48620964348a2039690624e7dc8e
Skip to content

Commit 7d1483c

Browse files
committed
Make an error message more understandable and consistent with other error messages.
1 parent b19284f commit 7d1483c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Objects/abstract.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ PyObject_GetItem(PyObject *o, PyObject *key)
156156
"be integer, not '%.200s'", key);
157157
}
158158

159-
return type_error("'%.200s' object is not subscriptable", o);
159+
return type_error("'%.200s' object has no attribute '__getitem__'", o);
160160
}
161161

162162
int

0 commit comments

Comments
 (0)