Message116336
Eli, while porting your tests to py3k, I had to change expected output for list comprehension testing. This is not really surprising because 3.x comprehensions differ from 2.x (they don't leak the loop variable anymore).
The difference between versions is most pronounced if a comprehension is spread in several lines:
l = [i for
i in
range(10)]
The coverage of the above code in 2.x is
1: l = [i for
i in
11: range(10)]
but in 3.x, I get
12: l = [i for
10: i in
1: range(10)]
Not surprisingly, 3.x coverage output for generators is the same as for comprehensions:
12: l = list(i for
10: i in
1: range(10))
but in 2.x,
12: l = list(i for
i in
1: range(10))
In any case, I think the counts from the second and third line (10 and 1) are probably correct in 3.x, but I cannot explain 12 in the first line. |
|
Date |
User |
Action |
Args |
2010-09-13 18:00:20 | belopolsky | set | recipients:
+ belopolsky, georg.brandl, terry.reedy, amaury.forgeotdarc, pitrou, ezio.melotti, eli.bendersky |
2010-09-13 18:00:20 | belopolsky | set | messageid: <1284400820.83.0.846942419259.issue9315@psf.upfronthosting.co.za> |
2010-09-13 18:00:13 | belopolsky | link | issue9315 messages |
2010-09-13 18:00:13 | belopolsky | create | |
|