Patch 549187. Improve string formatting error message.
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 6c18add..668668c 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -3628,7 +3628,7 @@
}
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 @@
} /* 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) {
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 9a3e456..5cc8455 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -5708,7 +5708,7 @@
}
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 @@
} /* until end */
if (argidx < arglen && !dict) {
PyErr_SetString(PyExc_TypeError,
- "not all arguments converted");
+ "not all arguments converted during string formatting");
goto onError;
}