From 135a7cf540b3070fd4b7ed30994ba3b75bc8183c Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Sun, 6 Sep 2009 10:32:21 +0000 Subject: [PATCH] =?UTF-8?q?Issue=20#6847:=20s/bytes/bytearray/=20in=20some?= =?UTF-8?q?=20bytearray=20error=20messages.=20=20Thanks=20Hagen=20F=C3=BCr?= =?UTF-8?q?stenau.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Objects/bytearrayobject.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c index 4105fa2cfae..b183cc1b626 100644 --- a/Objects/bytearrayobject.c +++ b/Objects/bytearrayobject.c @@ -2620,7 +2620,7 @@ bytearray_insert(PyByteArrayObject *self, PyObject *args) if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (!_getbytevalue(value, &ival)) @@ -2655,7 +2655,7 @@ bytearray_append(PyByteArrayObject *self, PyObject *arg) return NULL; if (n == PY_SSIZE_T_MAX) { PyErr_SetString(PyExc_OverflowError, - "cannot add more objects to bytes"); + "cannot add more objects to bytearray"); return NULL; } if (PyByteArray_Resize((PyObject *)self, n + 1) < 0) @@ -2756,7 +2756,7 @@ bytearray_pop(PyByteArrayObject *self, PyObject *args) if (n == 0) { PyErr_SetString(PyExc_OverflowError, - "cannot pop an empty bytes"); + "cannot pop an empty bytearray"); return NULL; } if (where < 0) @@ -2794,7 +2794,7 @@ bytearray_remove(PyByteArrayObject *self, PyObject *arg) break; } if (where == n) { - PyErr_SetString(PyExc_ValueError, "value not found in bytes"); + PyErr_SetString(PyExc_ValueError, "value not found in bytearray"); return NULL; } if (!_canresize(self))