Skip to content

Commit faf6e53

Browse files
committed
Revert "Use %T"
This reverts commit 7378e30.
1 parent 7378e30 commit faf6e53

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("'%T' object has no attribute '%U'",
2742-
obj, name);
2741+
result = PyUnicode_FromFormat("'%.200s' object has no attribute '%U'",
2742+
Py_TYPE(obj)->tp_name, name);
27432743
}
27442744
Py_DECREF(obj);
27452745
Py_DECREF(name);

0 commit comments

Comments
 (0)