mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Patch 549187. Improve string formatting error message.
This commit is contained in:
@@ -3628,7 +3628,7 @@ PyString_Format(PyObject *format, PyObject *args)
|
||||
}
|
||||
if (dict && (argidx < arglen) && c != '%') {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"not all arguments converted");
|
||||
"not all arguments converted during string formatting");
|
||||
goto error;
|
||||
}
|
||||
Py_XDECREF(temp);
|
||||
@@ -3636,7 +3636,7 @@ PyString_Format(PyObject *format, PyObject *args)
|
||||
} /* until end */
|
||||
if (argidx < arglen && !dict) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"not all arguments converted");
|
||||
"not all arguments converted during string formatting");
|
||||
goto error;
|
||||
}
|
||||
if (args_owned) {
|
||||
|
||||
@@ -5708,7 +5708,7 @@ PyObject *PyUnicode_Format(PyObject *format,
|
||||
}
|
||||
if (dict && (argidx < arglen) && c != '%') {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"not all arguments converted");
|
||||
"not all arguments converted during string formatting");
|
||||
goto onError;
|
||||
}
|
||||
Py_XDECREF(temp);
|
||||
@@ -5716,7 +5716,7 @@ PyObject *PyUnicode_Format(PyObject *format,
|
||||
} /* until end */
|
||||
if (argidx < arglen && !dict) {
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"not all arguments converted");
|
||||
"not all arguments converted during string formatting");
|
||||
goto onError;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user