2007-06-24 | paulb | raw files shortlog changelog graph | Test for iterator type leakage. | |
tests/listcomp.py (file) |
1.1 --- a/tests/listcomp.py Sun Jun 24 20:04:16 2007 +0200 1.2 +++ b/tests/listcomp.py Sun Jun 24 20:04:55 2007 +0200 1.3 @@ -5,3 +5,10 @@ 1.4 b = ["1", "2", "3"] 1.5 1.6 l = [f(x, y) for x in a for y in b if y > "1" if x > 1] 1.7 +l2 = [f(x, 2) for x in xrange(0, 10)] 1.8 + 1.9 +def test(a, b): 1.10 + for y in a: 1.11 + l2 = [f(x, 2) for x in xrange(0, 10)] 1.12 + 1.13 +test(a, b)