summaryrefslogtreecommitdiff
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index d1057b9c0c..c412393e6c 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -2537,8 +2537,9 @@ bytes_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (x == NULL) {
if (encoding != NULL || errors != NULL) {
PyErr_SetString(PyExc_TypeError,
- "encoding or errors without sequence "
- "argument");
+ encoding != NULL ?
+ "encoding without a string argument" :
+ "errors without a string argument");
return NULL;
}
return PyBytes_FromStringAndSize(NULL, 0);