summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-10-31 00:28:07 (GMT)
committerGitHub <noreply@github.com>2018-10-31 00:28:07 (GMT)
commit0353b4eaaf451ad463ce7eb3074f6b62d332f401 (patch)
treeee6c8d6f8368ae88711440e187aaa7294f423f6c /Objects
parent3f819ca138db6945ee4271bf13e42db9f9b3b1e4 (diff)
downloadcpython-0353b4eaaf451ad463ce7eb3074f6b62d332f401.zip
cpython-0353b4eaaf451ad463ce7eb3074f6b62d332f401.tar.gz
cpython-0353b4eaaf451ad463ce7eb3074f6b62d332f401.tar.bz2
bpo-33138: Change standard error message for non-pickleable and non-copyable types. (GH-6239)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 8e91e33..722fe5f 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4122,7 +4122,7 @@ _PyObject_GetState(PyObject *obj, int required)
if (required && obj->ob_type->tp_itemsize) {
PyErr_Format(PyExc_TypeError,
- "can't pickle %.200s objects",
+ "cannot pickle '%.200s' object",
Py_TYPE(obj)->tp_name);
return NULL;
}
@@ -4163,7 +4163,7 @@ _PyObject_GetState(PyObject *obj, int required)
Py_DECREF(slotnames);
Py_DECREF(state);
PyErr_Format(PyExc_TypeError,
- "can't pickle %.200s objects",
+ "cannot pickle '%.200s' object",
Py_TYPE(obj)->tp_name);
return NULL;
}
@@ -4400,7 +4400,7 @@ reduce_newobj(PyObject *obj)
if (Py_TYPE(obj)->tp_new == NULL) {
PyErr_Format(PyExc_TypeError,
- "can't pickle %.200s objects",
+ "cannot pickle '%.200s' object",
Py_TYPE(obj)->tp_name);
return NULL;
}