[pypy-commit] pypy refactor-str-types: Fix another list(<some str>).

Manuel Jacob noreply at buildbot.pypy.org
Sat Jul 27 12:59:45 CEST 2013


Author: Manuel Jacob
Branch: refactor-str-types
Changeset: r65705:cfbc930a7b52
Date: 2013-07-27 12:57 +0200
http://bitbucket.org/pypy/pypy/changeset/cfbc930a7b52/

Log:	Fix another list(<some str>).

diff --git a/pypy/objspace/std/bytesobject.py b/pypy/objspace/std/bytesobject.py
--- a/pypy/objspace/std/bytesobject.py
+++ b/pypy/objspace/std/bytesobject.py
@@ -182,8 +182,8 @@
             return space.add(self_as_unicode, w_other)
         elif space.isinstance_w(w_other, space.w_bytearray):
             # XXX: eliminate double-copy
-            from .bytearrayobject import W_BytearrayObject
-            self_as_bytearray = W_BytearrayObject(list(self._value))
+            from .bytearrayobject import W_BytearrayObject, _make_data
+            self_as_bytearray = W_BytearrayObject(_make_data(self._value))
             return space.add(self_as_bytearray, w_other)
         return StringMethods.descr_add(self, space, w_other)
 


More information about the pypy-commit mailing list