Commit 135a7cf5 authored by Mark Dickinson's avatar Mark Dickinson

Issue #6847: s/bytes/bytearray/ in some bytearray error messages. Thanks Hagen Fürstenau.

parent c8a7c7c3
...@@ -2620,7 +2620,7 @@ bytearray_insert(PyByteArrayObject *self, PyObject *args) ...@@ -2620,7 +2620,7 @@ bytearray_insert(PyByteArrayObject *self, PyObject *args)
if (n == PY_SSIZE_T_MAX) { if (n == PY_SSIZE_T_MAX) {
PyErr_SetString(PyExc_OverflowError, PyErr_SetString(PyExc_OverflowError,
"cannot add more objects to bytes"); "cannot add more objects to bytearray");
return NULL; return NULL;
} }
if (!_getbytevalue(value, &ival)) if (!_getbytevalue(value, &ival))
...@@ -2655,7 +2655,7 @@ bytearray_append(PyByteArrayObject *self, PyObject *arg) ...@@ -2655,7 +2655,7 @@ bytearray_append(PyByteArrayObject *self, PyObject *arg)
return NULL; return NULL;
if (n == PY_SSIZE_T_MAX) { if (n == PY_SSIZE_T_MAX) {
PyErr_SetString(PyExc_OverflowError, PyErr_SetString(PyExc_OverflowError,
"cannot add more objects to bytes"); "cannot add more objects to bytearray");
return NULL; return NULL;
} }
if (PyByteArray_Resize((PyObject *)self, n + 1) < 0) if (PyByteArray_Resize((PyObject *)self, n + 1) < 0)
...@@ -2756,7 +2756,7 @@ bytearray_pop(PyByteArrayObject *self, PyObject *args) ...@@ -2756,7 +2756,7 @@ bytearray_pop(PyByteArrayObject *self, PyObject *args)
if (n == 0) { if (n == 0) {
PyErr_SetString(PyExc_OverflowError, PyErr_SetString(PyExc_OverflowError,
"cannot pop an empty bytes"); "cannot pop an empty bytearray");
return NULL; return NULL;
} }
if (where < 0) if (where < 0)
...@@ -2794,7 +2794,7 @@ bytearray_remove(PyByteArrayObject *self, PyObject *arg) ...@@ -2794,7 +2794,7 @@ bytearray_remove(PyByteArrayObject *self, PyObject *arg)
break; break;
} }
if (where == n) { if (where == n) {
PyErr_SetString(PyExc_ValueError, "value not found in bytes"); PyErr_SetString(PyExc_ValueError, "value not found in bytearray");
return NULL; return NULL;
} }
if (!_canresize(self)) if (!_canresize(self))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment