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
6e025bcd
Kaydet (Commit)
6e025bcd
authored
Şub 10, 2001
tarafından
Eric S. Raymond
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String method cleanup.
üst
c8c6aa20
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
13 deletions
+7
-13
mhlib.py
Lib/mhlib.py
+2
-4
mimify.py
Lib/mimify.py
+1
-1
pre.py
Lib/pre.py
+1
-3
token.py
Lib/token.py
+1
-1
traceback.py
Lib/traceback.py
+2
-4
No files found.
Lib/mhlib.py
Dosyayı görüntüle @
6e025bcd
...
@@ -76,7 +76,6 @@ import os
...
@@ -76,7 +76,6 @@ import os
import
sys
import
sys
from
stat
import
ST_NLINK
from
stat
import
ST_NLINK
import
re
import
re
import
string
import
mimetools
import
mimetools
import
multifile
import
multifile
import
shutil
import
shutil
...
@@ -685,7 +684,7 @@ class Message(mimetools.Message):
...
@@ -685,7 +684,7 @@ class Message(mimetools.Message):
headers
=
[]
headers
=
[]
hit
=
0
hit
=
0
for
line
in
self
.
headers
:
for
line
in
self
.
headers
:
if
line
[
0
]
not
in
string
.
whitespace
:
if
not
line
[
0
]
.
isspace
()
:
i
=
line
.
find
(
':'
)
i
=
line
.
find
(
':'
)
if
i
>
0
:
if
i
>
0
:
hit
=
pred
(
line
[:
i
]
.
lower
())
hit
=
pred
(
line
[:
i
]
.
lower
())
...
@@ -885,7 +884,6 @@ class IntSet:
...
@@ -885,7 +884,6 @@ class IntSet:
self
.
normalize
()
self
.
normalize
()
def
fromstring
(
self
,
data
):
def
fromstring
(
self
,
data
):
import
string
new
=
[]
new
=
[]
for
part
in
data
.
split
(
self
.
sep
):
for
part
in
data
.
split
(
self
.
sep
):
list
=
[]
list
=
[]
...
@@ -918,7 +916,7 @@ def pickline(file, key, casefold = 1):
...
@@ -918,7 +916,7 @@ def pickline(file, key, casefold = 1):
text
=
line
[
len
(
key
)
+
1
:]
text
=
line
[
len
(
key
)
+
1
:]
while
1
:
while
1
:
line
=
f
.
readline
()
line
=
f
.
readline
()
if
not
line
or
line
[
0
]
not
in
string
.
whitespace
:
if
not
line
or
not
line
[
0
]
.
isspace
()
:
break
break
text
=
text
+
line
text
=
text
+
line
return
text
.
strip
()
return
text
.
strip
()
...
...
Lib/mimify.py
Dosyayı görüntüle @
6e025bcd
...
@@ -110,7 +110,7 @@ def mime_decode_header(line):
...
@@ -110,7 +110,7 @@ def mime_decode_header(line):
break
break
match
=
res
.
group
(
1
)
match
=
res
.
group
(
1
)
# convert underscores to spaces (before =XX conversion!)
# convert underscores to spaces (before =XX conversion!)
match
=
' '
.
join
(
string
.
split
(
match
,
'_'
))
match
=
' '
.
join
(
match
.
split
(
'_'
))
newline
=
newline
+
line
[
pos
:
res
.
start
(
0
)]
+
mime_decode
(
match
)
newline
=
newline
+
line
[
pos
:
res
.
start
(
0
)]
+
mime_decode
(
match
)
pos
=
res
.
end
(
0
)
pos
=
res
.
end
(
0
)
return
newline
+
line
[
pos
:]
return
newline
+
line
[
pos
:]
...
...
Lib/pre.py
Dosyayı görüntüle @
6e025bcd
...
@@ -85,7 +85,6 @@ This module also defines an exception 'error'.
...
@@ -85,7 +85,6 @@ This module also defines an exception 'error'.
import
sys
import
sys
import
string
from
pcre
import
*
from
pcre
import
*
#
#
...
@@ -223,10 +222,9 @@ def escape(pattern):
...
@@ -223,10 +222,9 @@ def escape(pattern):
"""
"""
result
=
list
(
pattern
)
result
=
list
(
pattern
)
alphanum
=
string
.
letters
+
'_'
+
string
.
digits
for
i
in
range
(
len
(
pattern
)):
for
i
in
range
(
len
(
pattern
)):
char
=
pattern
[
i
]
char
=
pattern
[
i
]
if
char
not
in
alphanum
:
if
not
char
.
isalnum
()
:
if
char
==
'
\000
'
:
result
[
i
]
=
'
\\
000'
if
char
==
'
\000
'
:
result
[
i
]
=
'
\\
000'
else
:
result
[
i
]
=
'
\\
'
+
char
else
:
result
[
i
]
=
'
\\
'
+
char
return
''
.
join
(
result
)
return
''
.
join
(
result
)
...
...
Lib/token.py
Dosyayı görüntüle @
6e025bcd
...
@@ -104,7 +104,7 @@ def main():
...
@@ -104,7 +104,7 @@ def main():
match
=
prog
.
match
(
line
)
match
=
prog
.
match
(
line
)
if
match
:
if
match
:
name
,
val
=
match
.
group
(
1
,
2
)
name
,
val
=
match
.
group
(
1
,
2
)
val
=
string
.
atoi
(
val
)
val
=
int
(
val
)
tokens
[
val
]
=
name
# reverse so we can sort them...
tokens
[
val
]
=
name
# reverse so we can sort them...
keys
=
tokens
.
keys
()
keys
=
tokens
.
keys
()
keys
.
sort
()
keys
.
sort
()
...
...
Lib/traceback.py
Dosyayı görüntüle @
6e025bcd
"""Extract, format and print information about Python stack traces."""
"""Extract, format and print information about Python stack traces."""
import
linecache
import
linecache
import
string
import
sys
import
sys
import
types
import
types
...
@@ -154,13 +153,12 @@ def format_exception_only(etype, value):
...
@@ -154,13 +153,12 @@ def format_exception_only(etype, value):
list
.
append
(
' File "
%
s", line
%
d
\n
'
%
list
.
append
(
' File "
%
s", line
%
d
\n
'
%
(
filename
,
lineno
))
(
filename
,
lineno
))
i
=
0
i
=
0
while
i
<
len
(
line
)
and
\
while
i
<
len
(
line
)
and
line
[
i
]
.
isspace
():
line
[
i
]
in
string
.
whitespace
:
i
=
i
+
1
i
=
i
+
1
list
.
append
(
'
%
s
\n
'
%
line
.
strip
())
list
.
append
(
'
%
s
\n
'
%
line
.
strip
())
s
=
' '
s
=
' '
for
c
in
line
[
i
:
offset
-
1
]:
for
c
in
line
[
i
:
offset
-
1
]:
if
c
in
string
.
whitespace
:
if
c
.
isspace
()
:
s
=
s
+
c
s
=
s
+
c
else
:
else
:
s
=
s
+
' '
s
=
s
+
' '
...
...
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