mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Patch 549187. Improve string formatting error message.
This commit is contained in:
parent
5ecb7aaa6a
commit
0ebac97058
2 changed files with 4 additions and 4 deletions
|
@ -3628,7 +3628,7 @@ PyString_Format(PyObject *format, PyObject *args)
|
||||||
}
|
}
|
||||||
if (dict && (argidx < arglen) && c != '%') {
|
if (dict && (argidx < arglen) && c != '%') {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"not all arguments converted");
|
"not all arguments converted during string formatting");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
Py_XDECREF(temp);
|
Py_XDECREF(temp);
|
||||||
|
@ -3636,7 +3636,7 @@ PyString_Format(PyObject *format, PyObject *args)
|
||||||
} /* until end */
|
} /* until end */
|
||||||
if (argidx < arglen && !dict) {
|
if (argidx < arglen && !dict) {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"not all arguments converted");
|
"not all arguments converted during string formatting");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (args_owned) {
|
if (args_owned) {
|
||||||
|
|
|
@ -5708,7 +5708,7 @@ PyObject *PyUnicode_Format(PyObject *format,
|
||||||
}
|
}
|
||||||
if (dict && (argidx < arglen) && c != '%') {
|
if (dict && (argidx < arglen) && c != '%') {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"not all arguments converted");
|
"not all arguments converted during string formatting");
|
||||||
goto onError;
|
goto onError;
|
||||||
}
|
}
|
||||||
Py_XDECREF(temp);
|
Py_XDECREF(temp);
|
||||||
|
@ -5716,7 +5716,7 @@ PyObject *PyUnicode_Format(PyObject *format,
|
||||||
} /* until end */
|
} /* until end */
|
||||||
if (argidx < arglen && !dict) {
|
if (argidx < arglen && !dict) {
|
||||||
PyErr_SetString(PyExc_TypeError,
|
PyErr_SetString(PyExc_TypeError,
|
||||||
"not all arguments converted");
|
"not all arguments converted during string formatting");
|
||||||
goto onError;
|
goto onError;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue