diff --git a/tests/test-highlight.t b/tests/test-highlight.t
--- a/tests/test-highlight.t
+++ b/tests/test-highlight.t
@@ -49,7 +49,7 @@
> except (ValueError, IndexError):
> n = 10
> p = primes()
- > print "The first %d primes: %s" % (n, list(islice(p, n)))
+ > print("The first %d primes: %s" % (n, list(islice(p, n))))
> EOF
$ echo >> primes.py # to test html markup with an empty line just before EOF
$ hg ci -Ama
@@ -74,7 +74,7 @@
-
- annotate primes.py @ 0:1af356141006
+ annotate primes.py @ 0:f4fca47b67e6
tip
@@ -299,19 +299,19 @@
-
+
0
|
1 """Fun with generators. Corresponding Haskell implementation: |
@@ -321,14 +321,14 @@
2 |
@@ -338,14 +338,14 @@
3 primes = 2 : sieve [3, 5..] |
@@ -355,14 +355,14 @@
4 where sieve (p:ns) = p : sieve [n | n <- ns, mod n p /= 0] |
@@ -372,14 +372,14 @@
5 """ |
@@ -389,14 +389,14 @@
6 |
@@ -406,14 +406,14 @@
7 from itertools import dropwhile, ifilter, islice, count, chain |
@@ -423,14 +423,14 @@
8 |
@@ -440,14 +440,14 @@
9 def primes(): |
@@ -457,14 +457,14 @@
10 """Generate all primes.""" |
@@ -474,14 +474,14 @@
11 def sieve(ns): |
@@ -491,14 +491,14 @@
12 p = ns.next() |
@@ -508,14 +508,14 @@
13 # It is important to yield *here* in order to stop the |
@@ -525,14 +525,14 @@
14 # infinite recursion. |
@@ -542,14 +542,14 @@
15 yield p |
@@ -559,14 +559,14 @@
16 ns = ifilter(lambda n: n % p != 0, ns) |
@@ -576,14 +576,14 @@
17 for n in sieve(ns): |
@@ -593,14 +593,14 @@
18 yield n |
@@ -610,14 +610,14 @@
19 |
@@ -627,14 +627,14 @@
20 odds = ifilter(lambda i: i % 2 == 1, count()) |
@@ -644,14 +644,14 @@
21 return chain([2], sieve(dropwhile(lambda n: n < 3, odds))) |
@@ -661,14 +661,14 @@
22 |
@@ -678,14 +678,14 @@
23 if __name__ == "__main__": |
@@ -695,14 +695,14 @@
24 import sys |
@@ -712,14 +712,14 @@
25 try: |
@@ -729,14 +729,14 @@
26 n = int(sys.argv[1]) |
@@ -746,14 +746,14 @@
27 except (ValueError, IndexError): |
@@ -763,14 +763,14 @@
28 n = 10 |
@@ -780,14 +780,14 @@
29 p = primes() |
@@ -797,31 +797,31 @@
- 30 print "The first %d primes: %s" % (n, list(islice(p, n))) |
+ 30 print("The first %d primes: %s" % (n, list(islice(p, n)))) |
|
31 |