Author: Manuel Jacob
Branch: remove-list-smm-2
Changeset: r64317:4c29c508e415
Date: 2013-05-18 13:59 +0200
http://bitbucket.org/pypy/pypy/changeset/4c29c508e415/
Log: Don't use get_list_index in bytearrayobject.
diff --git a/pypy/objspace/std/bytearrayobject.py
b/pypy/objspace/std/bytearrayobject.py
--- a/pypy/objspace/std/bytearrayobject.py
+++ b/pypy/objspace/std/bytearrayobject.py
@@ -8,7 +8,7 @@
getbytevalue, makebytearraydata_w, new_bytearray)
from pypy.objspace.std.intobject import W_IntObject
from pypy.objspace.std.inttype import wrapint
-from pypy.objspace.std.listobject import get_list_index, get_positive_index
+from pypy.objspace.std.listobject import get_positive_index
from pypy.objspace.std.model import W_Object, registerimplementation
from pypy.objspace.std.multimethod import FailedToImplement
from pypy.objspace.std.noneobject import W_NoneObject
@@ -587,7 +587,7 @@
_setitem_slice_helper(space, w_bytearray.data, start, step, slicelength,
sequence2, empty_elem='\x00')
def delitem__Bytearray_ANY(space, w_bytearray, w_idx):
- idx = get_list_index(space, w_idx)
+ idx = space.getindex_w(w_idx, space.w_IndexError, "bytearray index")
try:
del w_bytearray.data[idx]
except IndexError:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit