From 016564ab51f991e7d67a62f4aa079df376ae549f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 7 Jan 1995 11:54:44 +0000 Subject: [PATCH] attribute-less object is AttributeError, not TypeError --- Objects/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/object.c b/Objects/object.c index d1bc681805f3..424caeb8ab86 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -254,7 +254,7 @@ getattr(v, name) char *name; { if (v->ob_type->tp_getattr == NULL) { - err_setstr(TypeError, "attribute-less object"); + err_setstr(AttributeError, "attribute-less object"); return NULL; } else {