Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
fff80dfa
Kaydet (Commit)
fff80dfa
authored
Şub 09, 2007
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Revert doubly-converted doctests.
üst
7131f844
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
13 deletions
+13
-13
Cookie.py
Lib/Cookie.py
+5
-5
difflib.py
Lib/difflib.py
+8
-8
No files found.
Lib/Cookie.py
Dosyayı görüntüle @
fff80dfa
...
...
@@ -80,9 +80,9 @@ attributes by using the .output() function
>>> C = Cookie.SmartCookie()
>>> C["rocky"] = "road"
>>> C["rocky"]["path"] = "/cookie"
>>> print(
(C.output(header="Cookie:")
))
>>> print(
C.output(header="Cookie:"
))
Cookie: rocky=road; Path=/cookie
>>> print(
(C.output(attrs=[], header="Cookie:")
))
>>> print(
C.output(attrs=[], header="Cookie:"
))
Cookie: rocky=road
The load() method of a Cookie extracts cookies from a string. In a
...
...
@@ -100,7 +100,7 @@ such trickeries do not confuse it.
>>> C = Cookie.SmartCookie()
>>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
>>> print(
(C)
)
>>> print(
C
)
Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"
Each element of the Cookie also supports all of the RFC 2109
...
...
@@ -110,7 +110,7 @@ attribute.
>>> C = Cookie.SmartCookie()
>>> C["oreo"] = "doublestuff"
>>> C["oreo"]["path"] = "/"
>>> print(
(C)
)
>>> print(
C
)
Set-Cookie: oreo=doublestuff; Path=/
Each dictionary element has a 'value' attribute, which gives you
...
...
@@ -198,7 +198,7 @@ it is still possible to use Cookie.Cookie() to create a Cookie. In
fact, this simply returns a SmartCookie.
>>> C = Cookie.Cookie()
>>> print(
(C.__class__.__name__)
)
>>> print(
C.__class__.__name__
)
SmartCookie
...
...
Lib/difflib.py
Dosyayı görüntüle @
fff80dfa
...
...
@@ -76,7 +76,7 @@ class SequenceMatcher:
sequences. As a rule of thumb, a .ratio() value over 0.6 means the
sequences are close matches:
>>> print(
(round(s.ratio(), 3)
))
>>> print(
round(s.ratio(), 3
))
0.866
>>>
...
...
@@ -84,7 +84,7 @@ class SequenceMatcher:
.get_matching_blocks() is handy:
>>> for block in s.get_matching_blocks():
... print(
("a[
%
d] and b[
%
d] match for
%
d elements"
%
block)
)
... print(
"a[
%
d] and b[
%
d] match for
%
d elements"
%
block
)
a[0] and b[0] match for 8 elements
a[8] and b[17] match for 21 elements
a[29] and b[38] match for 0 elements
...
...
@@ -97,7 +97,7 @@ class SequenceMatcher:
use .get_opcodes():
>>> for opcode in s.get_opcodes():
... print(
("
%6
s a[
%
d:
%
d] b[
%
d:
%
d]"
%
opcode)
)
... print(
"
%6
s a[
%
d:
%
d] b[
%
d:
%
d]"
%
opcode
)
equal a[0:8] b[0:8]
insert a[8:8] b[8:17]
equal a[8:29] b[17:38]
...
...
@@ -545,8 +545,8 @@ class SequenceMatcher:
>>> b = "abycdf"
>>> s = SequenceMatcher(None, a, b)
>>> for tag, i1, i2, j1, j2 in s.get_opcodes():
... print((
(
"
%7
s a[
%
d:
%
d] (
%
s) b[
%
d:
%
d] (
%
s)"
%
... (tag, i1, i2, a[i1:i2], j1, j2, b[j1:j2])))
)
... print(("
%7
s a[
%
d:
%
d] (
%
s) b[
%
d:
%
d] (
%
s)"
%
... (tag, i1, i2, a[i1:i2], j1, j2, b[j1:j2])))
delete a[0:1] (q) b[0:0] ()
equal a[1:3] (ab) b[0:2] (ab)
replace a[3:4] (x) b[2:3] (y)
...
...
@@ -1059,8 +1059,8 @@ class Differ:
>>> d = Differ()
>>> results = d._qformat('\tabcDefghiJkl\n', '\t\tabcdefGhijkl\n',
... ' ^ ^ ^ ', '+ ^ ^ ^ ')
>>> for line in results: print(
(repr(line)
))
...
>>> for line in results: print(
repr(line
))
...
'- \tabcDefghiJkl\n'
'? \t ^ ^ ^\n'
'+ \t\tabcdefGhijkl\n'
...
...
@@ -1165,7 +1165,7 @@ def unified_diff(a, b, fromfile='', tofile='', fromfiledate='',
... 'zero one tree four'.split(), 'Original', 'Current',
... 'Sat Jan 26 23:30:50 1991', 'Fri Jun 06 10:20:52 2003',
... lineterm=''):
... print(
(line)
)
... print(
line
)
--- Original Sat Jan 26 23:30:50 1991
+++ Current Fri Jun 06 10:20:52 2003
@@ -1,4 +1,4 @@
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment