diff options
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/classobject.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index 8ee1344..4fb1167 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -592,7 +592,10 @@ instance_getattr1(inst, name) if (v == NULL) { v = class_lookup(inst->in_class, name, &class); if (v == NULL) { - PyErr_SetObject(PyExc_AttributeError, name); + PyErr_Format(PyExc_AttributeError, + "'%.50s' instance has no attribute '%.400s'", + PyString_AsString(inst->in_class->cl_name), + sname); return NULL; } } |