Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fff80df

Browse files
committed
Revert doubly-converted doctests.
1 parent 7131f84 commit fff80df

2 files changed

Lines changed: 13 additions & 13 deletions

File tree

Lib/Cookie.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@
8080
>>> C = Cookie.SmartCookie()
8181
>>> C["rocky"] = "road"
8282
>>> C["rocky"]["path"] = "/cookie"
83-
>>> print((C.output(header="Cookie:")))
83+
>>> print(C.output(header="Cookie:"))
8484
Cookie: rocky=road; Path=/cookie
85-
>>> print((C.output(attrs=[], header="Cookie:")))
85+
>>> print(C.output(attrs=[], header="Cookie:"))
8686
Cookie: rocky=road
8787
8888
The load() method of a Cookie extracts cookies from a string. In a
@@ -100,7 +100,7 @@
100100
101101
>>> C = Cookie.SmartCookie()
102102
>>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
103-
>>> print((C))
103+
>>> print(C)
104104
Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"
105105
106106
Each element of the Cookie also supports all of the RFC 2109
@@ -110,7 +110,7 @@
110110
>>> C = Cookie.SmartCookie()
111111
>>> C["oreo"] = "doublestuff"
112112
>>> C["oreo"]["path"] = "/"
113-
>>> print((C))
113+
>>> print(C)
114114
Set-Cookie: oreo=doublestuff; Path=/
115115
116116
Each dictionary element has a 'value' attribute, which gives you
@@ -198,7 +198,7 @@
198198
fact, this simply returns a SmartCookie.
199199
200200
>>> C = Cookie.Cookie()
201-
>>> print((C.__class__.__name__))
201+
>>> print(C.__class__.__name__)
202202
SmartCookie
203203
204204

Lib/difflib.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)