Skip to content

Commit 7378e30

Browse files
committed
Use %T
1 parent 7b73fb8 commit 7378e30

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Objects/exceptions.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2738,8 +2738,8 @@ AttributeError_str(PyObject *op)
27382738
result = PyUnicode_FromFormat("module has no attribute '%U'", name);
27392739
}
27402740
} else {
2741-
result = PyUnicode_FromFormat("'%.200s' object has no attribute '%U'",
2742-
Py_TYPE(obj)->tp_name, name);
2741+
result = PyUnicode_FromFormat("'%T' object has no attribute '%U'",
2742+
obj, name);
27432743
}
27442744
Py_DECREF(obj);
27452745
Py_DECREF(name);

0 commit comments

Comments
 (0)