[Python-checkins] r74677 - python/trunk/Objects/bytearrayobject.c

mark.dickinson python-checkins at python.org
Sun Sep 6 12:32:22 CEST 2009


Author: mark.dickinson
Date: Sun Sep  6 12:32:21 2009
New Revision: 74677

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

Modified:
   python/trunk/Objects/bytearrayobject.c

Modified: python/trunk/Objects/bytearrayobject.c
==============================================================================
--- python/trunk/Objects/bytearrayobject.c	(original)
+++ python/trunk/Objects/bytearrayobject.c	Sun Sep  6 12:32:21 2009
@@ -2620,7 +2620,7 @@
 
     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 @@
         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 @@
 
     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 @@
             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))


More information about the Python-checkins mailing list