]> granicus.if.org Git - python/commitdiff
Merged revisions 74677 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Sun, 6 Sep 2009 10:33:12 +0000 (10:33 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sun, 6 Sep 2009 10:33:12 +0000 (10:33 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r74677 | mark.dickinson | 2009-09-06 11:32:21 +0100 (Sun, 06 Sep 2009) | 1 line

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

Objects/bytearrayobject.c

index f6a5c160ecac5225093ae1274bc1334d6eec52e9..01c5e11b55b7ec2150929d5f64bae4ab22cad843 100644 (file)
@@ -2605,7 +2605,7 @@ bytes_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))
@@ -2640,7 +2640,7 @@ bytes_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)
@@ -2741,7 +2741,7 @@ bytes_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)
@@ -2779,7 +2779,7 @@ bytes_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))