Change error messages for impossible assignment slightly.

This commit is contained in:
Guido van Rossum 1991-12-24 13:28:03 +00:00
parent 32dffaa016
commit 3ea7412d38

View File

@ -169,9 +169,11 @@ setattr(v, name, w)
{
if (v->ob_type->tp_setattr == NULL) {
if (v->ob_type->tp_getattr == NULL)
err_setstr(TypeError, "attribute-less object");
err_setstr(TypeError,
"attribute-less object (assign or del)");
else
err_setstr(TypeError, "object has read-only attributes");
err_setstr(TypeError,
"object has read-only attributes");
return -1;
}
else {