]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
attribute-less object is AttributeError, not TypeError
authorGuido van Rossum <guido@python.org>
Sat, 7 Jan 1995 11:54:44 +0000 (11:54 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 7 Jan 1995 11:54:44 +0000 (11:54 +0000)
Objects/object.c

index d1bc681805f3161e1ceb7cca07b119bd182af96c..424caeb8ab86b6fd52d811119704876eafdc7cbf 100644 (file)
@@ -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 {