summaryrefslogtreecommitdiffstats
path: root/Modules/arraymodule.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-12-05 20:25:22 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-12-05 20:25:22 (GMT)
commitb757c83ec626442a8804b9417790443bf13b4fc8 (patch)
treee9361287f1239fa9758a9387cbd7aa9096a76601 /Modules/arraymodule.c
parent6b335196c50049685e5fd2dc420cbba68de489e8 (diff)
downloadcpython-b757c83ec626442a8804b9417790443bf13b4fc8.zip
cpython-b757c83ec626442a8804b9417790443bf13b4fc8.tar.gz
cpython-b757c83ec626442a8804b9417790443bf13b4fc8.tar.bz2
Issue #22581: Use more "bytes-like object" throughout the docs and comments.
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r--Modules/arraymodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c
index 24f0ea0..5ab1ab6 100644
--- a/Modules/arraymodule.c
+++ b/Modules/arraymodule.c
@@ -1441,14 +1441,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;