]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch 549187. Improve string formatting error message.
authorRaymond Hettinger <python@rcn.com>
Tue, 21 May 2002 15:14:57 +0000 (15:14 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 21 May 2002 15:14:57 +0000 (15:14 +0000)
Objects/stringobject.c
Objects/unicodeobject.c

index 6c18addcafc20bbce21013bbbfdef2a4ff556792..668668ca4d0920813e8fdcb528937bb15735f9a3 100644 (file)
@@ -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) {
index 9a3e4568660fc112c1252c7004674ab6b523a240..5cc8455be6c2e50c20f4e919afc9c469ca7ad82f 100644 (file)
@@ -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;
     }