[pypy-svn] pypy bytearray: (lac, mfoord) bytearray.join and decode operations work again
mfoord
commits-noreply at bitbucket.org
Thu Jan 20 16:54:21 CET 2011
Author: Michael Foord <michael at voidspace.org.uk>
Branch: bytearray
Changeset: r41047:d52e98d256f6
Date: 2011-01-20 16:49 +0100
http://bitbucket.org/pypy/pypy/changeset/d52e98d256f6/
Log: (lac, mfoord) bytearray.join and decode operations work again
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
@@ -132,6 +132,11 @@
data2 = [c for c in space.bufferstr_w(w_other)]
return W_BytearrayObject(data1 + data2)
+def add__String_Bytearray(space, w_str, w_bytearray):
+ data2 = w_bytearray.data
+ data1 = [c for c in space.str_w(w_str)]
+ return W_BytearrayObject(data1 + data2)
+
def mul_bytearray_times(space, w_bytearray, w_times):
try:
times = space.getindex_w(w_times, space.w_OverflowError)
More information about the Pypy-commit
mailing list