From 0ebac97058baad8250adf710f287e8fb8770f7fa Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Tue, 21 May 2002 15:14:57 +0000 Subject: [PATCH] Patch 549187. Improve string formatting error message. --- Objects/stringobject.c | 4 ++-- Objects/unicodeobject.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 6c18addcaf..668668ca4d 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 9a3e456866..5cc8455be6 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; } -- 2.50.1