mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-103712: Increase the length of the type name in AttributeError messages (#103713)
This commit is contained in:
parent
59c522f965
commit
543009347e
4 changed files with 7 additions and 7 deletions
|
@ -1033,7 +1033,7 @@ PyObject_GetAttr(PyObject *v, PyObject *name)
|
|||
}
|
||||
else {
|
||||
PyErr_Format(PyExc_AttributeError,
|
||||
"'%.50s' object has no attribute '%U'",
|
||||
"'%.100s' object has no attribute '%U'",
|
||||
tp->tp_name, name);
|
||||
}
|
||||
|
||||
|
@ -1353,7 +1353,7 @@ _PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method)
|
|||
}
|
||||
|
||||
PyErr_Format(PyExc_AttributeError,
|
||||
"'%.50s' object has no attribute '%U'",
|
||||
"'%.100s' object has no attribute '%U'",
|
||||
tp->tp_name, name);
|
||||
|
||||
set_attribute_error_context(obj, name);
|
||||
|
@ -1474,7 +1474,7 @@ _PyObject_GenericGetAttrWithDict(PyObject *obj, PyObject *name,
|
|||
|
||||
if (!suppress) {
|
||||
PyErr_Format(PyExc_AttributeError,
|
||||
"'%.50s' object has no attribute '%U'",
|
||||
"'%.100s' object has no attribute '%U'",
|
||||
tp->tp_name, name);
|
||||
|
||||
set_attribute_error_context(obj, name);
|
||||
|
@ -1545,7 +1545,7 @@ _PyObject_GenericSetAttrWithDict(PyObject *obj, PyObject *name,
|
|||
}
|
||||
else {
|
||||
PyErr_Format(PyExc_AttributeError,
|
||||
"'%.50s' object attribute '%U' is read-only",
|
||||
"'%.100s' object attribute '%U' is read-only",
|
||||
tp->tp_name, name);
|
||||
}
|
||||
goto done;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue