@@ -76,15 +76,15 @@ class SequenceMatcher:
7676 sequences. As a rule of thumb, a .ratio() value over 0.6 means the
7777 sequences are close matches:
7878
79- >>> print(( round(s.ratio(), 3) ))
79+ >>> print(round(s.ratio(), 3))
8080 0.866
8181 >>>
8282
8383 If you're only interested in where the sequences match,
8484 .get_matching_blocks() is handy:
8585
8686 >>> for block in s.get_matching_blocks():
87- ... print(( "a[%d] and b[%d] match for %d elements" % block) )
87+ ... print("a[%d] and b[%d] match for %d elements" % block)
8888 a[0] and b[0] match for 8 elements
8989 a[8] and b[17] match for 21 elements
9090 a[29] and b[38] match for 0 elements
@@ -97,7 +97,7 @@ class SequenceMatcher:
9797 use .get_opcodes():
9898
9999 >>> for opcode in s.get_opcodes():
100- ... print(( "%6s a[%d:%d] b[%d:%d]" % opcode) )
100+ ... print("%6s a[%d:%d] b[%d:%d]" % opcode)
101101 equal a[0:8] b[0:8]
102102 insert a[8:8] b[8:17]
103103 equal a[8:29] b[17:38]
@@ -545,8 +545,8 @@ def get_opcodes(self):
545545 >>> b = "abycdf"
546546 >>> s = SequenceMatcher(None, a, b)
547547 >>> for tag, i1, i2, j1, j2 in s.get_opcodes():
548- ... print((( "%7s a[%d:%d] (%s) b[%d:%d] (%s)" %
549- ... (tag, i1, i2, a[i1:i2], j1, j2, b[j1:j2]))))
548+ ... print(("%7s a[%d:%d] (%s) b[%d:%d] (%s)" %
549+ ... (tag, i1, i2, a[i1:i2], j1, j2, b[j1:j2])))
550550 delete a[0:1] (q) b[0:0] ()
551551 equal a[1:3] (ab) b[0:2] (ab)
552552 replace a[3:4] (x) b[2:3] (y)
@@ -1059,8 +1059,8 @@ def _qformat(self, aline, bline, atags, btags):
10591059 >>> d = Differ()
10601060 >>> results = d._qformat('\tabcDefghiJkl\n', '\t\tabcdefGhijkl\n',
10611061 ... ' ^ ^ ^ ', '+ ^ ^ ^ ')
1062- >>> for line in results: print(( repr(line) ))
1063- ...
1062+ >>> for line in results: print(repr(line))
1063+ ...
10641064 '- \tabcDefghiJkl\n'
10651065 '? \t ^ ^ ^\n'
10661066 '+ \t\tabcdefGhijkl\n'
@@ -1165,7 +1165,7 @@ def unified_diff(a, b, fromfile='', tofile='', fromfiledate='',
11651165 ... 'zero one tree four'.split(), 'Original', 'Current',
11661166 ... 'Sat Jan 26 23:30:50 1991', 'Fri Jun 06 10:20:52 2003',
11671167 ... lineterm=''):
1168- ... print(( line) )
1168+ ... print(line)
11691169 --- Original Sat Jan 26 23:30:50 1991
11701170 +++ Current Fri Jun 06 10:20:52 2003
11711171 @@ -1,4 +1,4 @@
0 commit comments