]> granicus.if.org Git - python/commitdiff
Clean up error messages raised by save_reduce in _pickle.
authorAlexandre Vassalotti <alexandre@peadrop.com>
Sun, 14 Apr 2013 08:28:01 +0000 (01:28 -0700)
committerAlexandre Vassalotti <alexandre@peadrop.com>
Sun, 14 Apr 2013 08:28:01 +0000 (01:28 -0700)
Modules/_pickle.c

index c213a51582b9f07dc7331bd55d08edfd44cbb972..d0cebd0b17317a746545db4b524ad0a2321c27b4 100644 (file)
@@ -2958,7 +2958,7 @@ save_reduce(PicklerObject *self, PyObject *args, PyObject *obj)
     if (listitems == Py_None)
         listitems = NULL;
     else if (!PyIter_Check(listitems)) {
-        PyErr_Format(PicklingError, "Fourth element of tuple"
+        PyErr_Format(PicklingError, "fourth element of the tuple "
                      "returned by __reduce__ must be an iterator, not %s",
                      Py_TYPE(listitems)->tp_name);
         return -1;
@@ -2967,7 +2967,7 @@ save_reduce(PicklerObject *self, PyObject *args, PyObject *obj)
     if (dictitems == Py_None)
         dictitems = NULL;
     else if (!PyIter_Check(dictitems)) {
-        PyErr_Format(PicklingError, "Fifth element of tuple"
+        PyErr_Format(PicklingError, "fifth element of the tuple "
                      "returned by __reduce__ must be an iterator, not %s",
                      Py_TYPE(dictitems)->tp_name);
         return -1;