Kaydet (Commit) db935164 authored tarafından Guido van Rossum's avatar Guido van Rossum

Instead of "attribute-less object", issue an error message that

contains the type of the object and name of the attribute.
üst cf57d8b8
...@@ -348,7 +348,10 @@ PyObject_GetAttrString(v, name) ...@@ -348,7 +348,10 @@ PyObject_GetAttrString(v, name)
} }
if (v->ob_type->tp_getattr == NULL) { if (v->ob_type->tp_getattr == NULL) {
PyErr_SetString(PyExc_AttributeError, "attribute-less object"); PyErr_Format(PyExc_AttributeError,
"'%.50s' object has no attribute '%.400s'",
v->ob_type->tp_name,
name);
return NULL; return NULL;
} }
else { else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment