Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r62742:7a260b2c4511
Date: 2013-03-25 09:10 -0400
http://bitbucket.org/pypy/pypy/changeset/7a260b2c4511/

Log:    should try listview_unicode here too

diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -726,6 +726,13 @@
             w_list.lstorage = strategy.erase(strlist[:])
             return
 
+        unilist = space.listview_unicode(w_iterable)
+        if unilist is not None:
+            w_list.strategy = strategy = space.fromcache(UnicodeListStrategy)
+            # need to copy because intlist can share with w_iterable
+            w_list.lstorage = strategy.erase(unilist[:])
+            return
+
         ListStrategy._extend_from_iterable(self, w_list, w_iterable)
 
     def reverse(self, w_list):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to