diff options
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r-- | Modules/arraymodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index b7ef702..87bdb2c 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -1573,14 +1573,14 @@ frombytes(arrayobject *self, Py_buffer *buffer) Py_ssize_t n; if (buffer->itemsize != 1) { PyBuffer_Release(buffer); - PyErr_SetString(PyExc_TypeError, "string/buffer of bytes required."); + PyErr_SetString(PyExc_TypeError, "a bytes-like object is required"); return NULL; } n = buffer->len; if (n % itemsize != 0) { PyBuffer_Release(buffer); PyErr_SetString(PyExc_ValueError, - "string length not a multiple of item size"); + "bytes length not a multiple of item size"); return NULL; } n = n / itemsize; |