From: Raymond Hettinger Date: Tue, 21 May 2002 15:14:57 +0000 (+0000) Subject: Patch 549187. Improve string formatting error message. X-Git-Tag: v2.3c1~5633 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ebac97058baad8250adf710f287e8fb8770f7fa;p=thirdparty%2FPython%2Fcpython.git Patch 549187. Improve string formatting error message. --- diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 6c18addcafc2..668668ca4d09 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -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) { diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9a3e4568660f..5cc8455be6c2 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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; }