Author: Maciej Fijalkowski <[email protected]>
Branch: 
Changeset: r49581:4150312ee458
Date: 2011-11-20 17:59 +0200
http://bitbucket.org/pypy/pypy/changeset/4150312ee458/

Log:    A failing test showing problems with list-comprehension-optimization

diff --git a/pypy/translator/test/test_simplify.py 
b/pypy/translator/test/test_simplify.py
--- a/pypy/translator/test/test_simplify.py
+++ b/pypy/translator/test/test_simplify.py
@@ -305,6 +305,21 @@
             'hint': 2,
             })
 
+    def test_iterate_over_list(self):
+        def wrap(elem):
+            return elem
+        
+        def f(i):
+            new_l = []
+            l = range(4)
+            for elem in l:
+                new_l.append(wrap(elem))
+            return new_l
+
+        self.check(f, {
+            })
+            
+
 class TestLLSpecializeListComprehension:
     typesystem = 'lltype'
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to