[pypy-svn] r69588 - pypy/trunk/pypy/objspace/std

arigo at codespeak.net arigo at codespeak.net
Tue Nov 24 16:08:06 CET 2009


Author: arigo
Date: Tue Nov 24 16:08:06 2009
New Revision: 69588

Modified:
   pypy/trunk/pypy/objspace/std/stringobject.py
Log:
Fix the fix the fix.  Please go on the branch.  Seriously.


Modified: pypy/trunk/pypy/objspace/std/stringobject.py
==============================================================================
--- pypy/trunk/pypy/objspace/std/stringobject.py	(original)
+++ pypy/trunk/pypy/objspace/std/stringobject.py	Tue Nov 24 16:08:06 2009
@@ -360,8 +360,11 @@
             w_s = list_w[i]
             if not space.is_true(space.isinstance(w_s, space.w_str)):
                 if space.is_true(space.isinstance(w_s, space.w_unicode)):
+                    # we need to rebuild w_list here, because the original
+                    # w_list might be an iterable which we already consumed
+                    w_list = space.newlist(list_w)
                     w_u = space.call_function(space.w_unicode, w_self)
-                    return space.call_method(w_u, "join", space.newlist(list_w))
+                    return space.call_method(w_u, "join", w_list)
                 raise OperationError(
                     space.w_TypeError,
                     space.wrap("sequence item %d: expected string, %s "



More information about the Pypy-commit mailing list