[pypy-commit] pypy refactor-buffer-api: merge default
bdkearns
noreply at buildbot.pypy.org
Tue Apr 22 20:34:16 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: refactor-buffer-api
Changeset: r70868:5499bfba3fb8
Date: 2014-04-22 14:31 -0400
http://bitbucket.org/pypy/pypy/changeset/5499bfba3fb8/
Log: merge default
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
@@ -1048,28 +1048,6 @@
init_defaults = [None, None, None]
-# XXX consider moving to W_BytearrayObject or remove
-def str_join__Bytearray_ANY(space, w_self, w_list):
- list_w = space.listview(w_list)
- if not list_w:
- return W_BytearrayObject([])
- data = w_self.data
- newdata = []
- for i in range(len(list_w)):
- w_s = list_w[i]
- if not (space.isinstance_w(w_s, space.w_str) or
- space.isinstance_w(w_s, space.w_bytearray)):
- raise oefmt(space.w_TypeError,
- "sequence item %d: expected string, %T found", i, w_s)
-
- if data and i != 0:
- newdata.extend(data)
- newdata.extend([c for c in space.buffer_w(w_s).as_str()])
- return W_BytearrayObject(newdata)
-
-_space_chars = ''.join([chr(c) for c in [9, 10, 11, 12, 13, 32]])
-
-
# XXX share the code again with the stuff in listobject.py
def _delitem_slice_helper(space, items, start, step, slicelength):
if slicelength == 0:
More information about the pypy-commit
mailing list