summaryrefslogtreecommitdiffstats
path: root/Objects/object.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1991-12-24 13:28:03 (GMT)
committerGuido van Rossum <guido@python.org>1991-12-24 13:28:03 (GMT)
commit3ea7412d38e077a984c18f5e7f0793c285e1e1c3 (patch)
treee0676b4ac3a0849719d1b722305f9820dbaf9253 /Objects/object.c
parent32dffaa0164761fb94cffa32cfe01b3d0a83bf18 (diff)
downloadcpython-3ea7412d38e077a984c18f5e7f0793c285e1e1c3.zip
cpython-3ea7412d38e077a984c18f5e7f0793c285e1e1c3.tar.gz
cpython-3ea7412d38e077a984c18f5e7f0793c285e1e1c3.tar.bz2
Change error messages for impossible assignment slightly.
Diffstat (limited to 'Objects/object.c')
-rw-r--r--Objects/object.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/object.c b/Objects/object.c
index 78541d1..464d7ea 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -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 {