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
c411dbae
Kaydet (Commit)
c411dbae
authored
Tem 16, 2002
tarafından
Tim Peters
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Whitespace normalization.
üst
8531b1b2
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
48 additions
and
50 deletions
+48
-50
getopt.py
Lib/getopt.py
+2
-2
httplib.py
Lib/httplib.py
+6
-6
imaplib.py
Lib/imaplib.py
+1
-1
rfc822.py
Lib/rfc822.py
+1
-1
regrtest.py
Lib/test/regrtest.py
+27
-27
test_atexit.py
Lib/test/test_atexit.py
+1
-1
test_b1.py
Lib/test/test_b1.py
+2
-2
test_generators.py
Lib/test/test_generators.py
+1
-1
test_httplib.py
Lib/test/test_httplib.py
+0
-1
test_signal.py
Lib/test/test_signal.py
+0
-1
test_types.py
Lib/test/test_types.py
+1
-1
textwrap.py
Lib/textwrap.py
+3
-3
urllib2.py
Lib/urllib2.py
+2
-2
weakref.py
Lib/weakref.py
+1
-1
No files found.
Lib/getopt.py
Dosyayı görüntüle @
c411dbae
...
@@ -9,7 +9,7 @@ provides two functions and an exception:
...
@@ -9,7 +9,7 @@ provides two functions and an exception:
getopt() -- Parse command line options
getopt() -- Parse command line options
gnu_getopt() -- Like getopt(), but allow option and non-option arguments
gnu_getopt() -- Like getopt(), but allow option and non-option arguments
to be intermixed.
to be intermixed.
GetoptError -- exception (class) raised with 'opt' attribute, which is the
GetoptError -- exception (class) raised with 'opt' attribute, which is the
option involved with the exception.
option involved with the exception.
"""
"""
...
@@ -103,7 +103,7 @@ def gnu_getopt(args, shortopts, longopts = []):
...
@@ -103,7 +103,7 @@ def gnu_getopt(args, shortopts, longopts = []):
If the first character of the option string is `+', or if the
If the first character of the option string is `+', or if the
environment variable POSIXLY_CORRECT is set, then option
environment variable POSIXLY_CORRECT is set, then option
processing stops as soon as a non-option argument is encountered.
processing stops as soon as a non-option argument is encountered.
"""
"""
opts
=
[]
opts
=
[]
...
...
Lib/httplib.py
Dosyayı görüntüle @
c411dbae
...
@@ -276,7 +276,7 @@ class HTTPResponse:
...
@@ -276,7 +276,7 @@ class HTTPResponse:
break
break
if
self
.
debuglevel
>
0
:
if
self
.
debuglevel
>
0
:
print
"header:"
,
skip
print
"header:"
,
skip
self
.
status
=
status
self
.
status
=
status
self
.
reason
=
reason
.
strip
()
self
.
reason
=
reason
.
strip
()
if
version
==
'HTTP/1.0'
:
if
version
==
'HTTP/1.0'
:
...
@@ -482,7 +482,7 @@ class HTTPConnection:
...
@@ -482,7 +482,7 @@ class HTTPConnection:
self
.
_buffer
=
[]
self
.
_buffer
=
[]
self
.
__response
=
None
self
.
__response
=
None
self
.
__state
=
_CS_IDLE
self
.
__state
=
_CS_IDLE
self
.
_set_hostport
(
host
,
port
)
self
.
_set_hostport
(
host
,
port
)
if
strict
is
not
None
:
if
strict
is
not
None
:
self
.
strict
=
strict
self
.
strict
=
strict
...
@@ -815,7 +815,7 @@ class SSLFile(SharedSocketClient):
...
@@ -815,7 +815,7 @@ class SSLFile(SharedSocketClient):
"""File-like object wrapping an SSL socket."""
"""File-like object wrapping an SSL socket."""
BUFSIZE
=
8192
BUFSIZE
=
8192
def
__init__
(
self
,
sock
,
ssl
,
bufsize
=
None
):
def
__init__
(
self
,
sock
,
ssl
,
bufsize
=
None
):
SharedSocketClient
.
__init__
(
self
,
sock
)
SharedSocketClient
.
__init__
(
self
,
sock
)
self
.
_ssl
=
ssl
self
.
_ssl
=
ssl
...
@@ -1139,7 +1139,7 @@ class LineAndFileWrapper:
...
@@ -1139,7 +1139,7 @@ class LineAndFileWrapper:
if
amt
is
None
:
if
amt
is
None
:
return
s
+
self
.
_file
.
read
()
return
s
+
self
.
_file
.
read
()
else
:
else
:
return
s
+
self
.
_file
.
read
(
amt
-
len
(
s
))
return
s
+
self
.
_file
.
read
(
amt
-
len
(
s
))
else
:
else
:
assert
amt
<=
self
.
_line_left
assert
amt
<=
self
.
_line_left
i
=
self
.
_line_offset
i
=
self
.
_line_offset
...
@@ -1150,7 +1150,7 @@ class LineAndFileWrapper:
...
@@ -1150,7 +1150,7 @@ class LineAndFileWrapper:
if
self
.
_line_left
==
0
:
if
self
.
_line_left
==
0
:
self
.
_done
()
self
.
_done
()
return
s
return
s
def
readline
(
self
):
def
readline
(
self
):
s
=
self
.
_line
[
self
.
_line_offset
:]
s
=
self
.
_line
[
self
.
_line_offset
:]
self
.
_done
()
self
.
_done
()
...
@@ -1207,7 +1207,7 @@ def test():
...
@@ -1207,7 +1207,7 @@ def test():
h
.
close
()
h
.
close
()
if
hasattr
(
socket
,
'ssl'
):
if
hasattr
(
socket
,
'ssl'
):
for
host
,
selector
in
((
'sourceforge.net'
,
'/projects/python'
),
for
host
,
selector
in
((
'sourceforge.net'
,
'/projects/python'
),
(
'dbserv2.theopalgroup.com'
,
'/mediumfile'
),
(
'dbserv2.theopalgroup.com'
,
'/mediumfile'
),
(
'dbserv2.theopalgroup.com'
,
'/smallfile'
),
(
'dbserv2.theopalgroup.com'
,
'/smallfile'
),
...
...
Lib/imaplib.py
Dosyayı görüntüle @
c411dbae
...
@@ -1058,7 +1058,7 @@ class IMAP4_SSL(IMAP4):
...
@@ -1058,7 +1058,7 @@ class IMAP4_SSL(IMAP4):
# sslobj.read() sometimes returns < size bytes
# sslobj.read() sometimes returns < size bytes
data
=
self
.
sslobj
.
read
(
size
)
data
=
self
.
sslobj
.
read
(
size
)
while
len
(
data
)
<
size
:
while
len
(
data
)
<
size
:
data
+=
self
.
sslobj
.
read
(
size
-
len
(
data
))
data
+=
self
.
sslobj
.
read
(
size
-
len
(
data
))
return
data
return
data
...
...
Lib/rfc822.py
Dosyayı görüntüle @
c411dbae
...
@@ -443,7 +443,7 @@ class Message:
...
@@ -443,7 +443,7 @@ class Message:
def
__contains__
(
self
,
name
):
def
__contains__
(
self
,
name
):
"""Determine whether a message contains the named header."""
"""Determine whether a message contains the named header."""
return
name
.
lower
()
in
self
.
dict
return
name
.
lower
()
in
self
.
dict
def
keys
(
self
):
def
keys
(
self
):
"""Get all of a message's header field names."""
"""Get all of a message's header field names."""
...
...
Lib/test/regrtest.py
Dosyayı görüntüle @
c411dbae
...
@@ -711,33 +711,33 @@ _expectations = {
...
@@ -711,33 +711,33 @@ _expectations = {
test_zlib
test_zlib
"""
,
"""
,
'atheos'
:
'atheos'
:
"""
"""
test_al
test_al
test_cd
test_cd
test_cl
test_cl
test_curses
test_curses
test_dl
test_dl
test_email_codecs
test_email_codecs
test_gdbm
test_gdbm
test_gl
test_gl
test_imgfile
test_imgfile
test_largefile
test_largefile
test_linuxaudiodev
test_linuxaudiodev
test_locale
test_locale
test_mhlib
test_mhlib
test_mmap
test_mmap
test_mpz
test_mpz
test_nis
test_nis
test_poll
test_poll
test_popen2
test_popen2
test_resource
test_resource
test_socket_ssl
test_socket_ssl
test_socketserver
test_socketserver
test_sunaudiodev
test_sunaudiodev
test_unicode_file
test_unicode_file
test_winreg
test_winreg
test_winsound
test_winsound
"""
,
"""
,
}
}
class
_ExpectedSkips
:
class
_ExpectedSkips
:
...
...
Lib/test/test_atexit.py
Dosyayı görüntüle @
c411dbae
...
@@ -38,7 +38,7 @@ def direct():
...
@@ -38,7 +38,7 @@ def direct():
import sys
import sys
sys.exitfunc = direct
sys.exitfunc = direct
# Make sure atexit doesn't drop
# Make sure atexit doesn't drop
def indirect():
def indirect():
print "indirect exit"
print "indirect exit"
...
...
Lib/test/test_b1.py
Dosyayı görüntüle @
c411dbae
...
@@ -102,9 +102,9 @@ compile('print 1\n', '', 'exec')
...
@@ -102,9 +102,9 @@ compile('print 1\n', '', 'exec')
print
'complex'
print
'complex'
class
OS
:
class
OS
:
def
__complex__
(
self
):
return
1
+
10
j
def
__complex__
(
self
):
return
1
+
10
j
class
NS
(
object
):
class
NS
(
object
):
def
__complex__
(
self
):
return
1
+
10
j
def
__complex__
(
self
):
return
1
+
10
j
if
complex
(
OS
())
!=
1
+
10
j
:
raise
TestFailed
,
'__complex__ in old style class'
if
complex
(
OS
())
!=
1
+
10
j
:
raise
TestFailed
,
'__complex__ in old style class'
if
complex
(
NS
())
!=
1
+
10
j
:
raise
TestFailed
,
'__complex__ in new style class'
if
complex
(
NS
())
!=
1
+
10
j
:
raise
TestFailed
,
'__complex__ in new style class'
if
complex
(
"1+10j"
)
!=
1
+
10
j
:
raise
TestFailed
,
'complex("1+10j")'
if
complex
(
"1+10j"
)
!=
1
+
10
j
:
raise
TestFailed
,
'complex("1+10j")'
...
...
Lib/test/test_generators.py
Dosyayı görüntüle @
c411dbae
...
@@ -814,7 +814,7 @@ This one caused a crash (see SF bug 567538):
...
@@ -814,7 +814,7 @@ This one caused a crash (see SF bug 567538):
... continue
... continue
... finally:
... finally:
... yield i
... yield i
...
...
>>> g = f()
>>> g = f()
>>> print g.next()
>>> print g.next()
0
0
...
...
Lib/test/test_httplib.py
Dosyayı görüntüle @
c411dbae
...
@@ -56,4 +56,3 @@ r.begin()
...
@@ -56,4 +56,3 @@ r.begin()
cookies
=
r
.
getheader
(
"Set-Cookie"
)
cookies
=
r
.
getheader
(
"Set-Cookie"
)
if
cookies
!=
hdr
:
if
cookies
!=
hdr
:
raise
AssertionError
,
"multiple headers not combined properly"
raise
AssertionError
,
"multiple headers not combined properly"
Lib/test/test_signal.py
Dosyayı görüntüle @
c411dbae
...
@@ -125,4 +125,3 @@ if hasattr(signal, "sigprocmask"):
...
@@ -125,4 +125,3 @@ if hasattr(signal, "sigprocmask"):
pass
pass
else
:
else
:
raise
TestFailed
,
"sigsupsend didn't raise"
raise
TestFailed
,
"sigsupsend didn't raise"
Lib/test/test_types.py
Dosyayı görüntüle @
c411dbae
...
@@ -211,7 +211,7 @@ if have_unicode:
...
@@ -211,7 +211,7 @@ if have_unicode:
vereq
(
a
[
-
100
:
100
:],
a
)
vereq
(
a
[
-
100
:
100
:],
a
)
vereq
(
a
[
100
:
-
100
:
-
1
],
a
[::
-
1
])
vereq
(
a
[
100
:
-
100
:
-
1
],
a
[::
-
1
])
vereq
(
a
[
-
100L
:
100L
:
2L
],
unicode
(
'02468'
,
'ascii'
))
vereq
(
a
[
-
100L
:
100L
:
2L
],
unicode
(
'02468'
,
'ascii'
))
print
'6.5.2 Tuples'
print
'6.5.2 Tuples'
if
len
(())
!=
0
:
raise
TestFailed
,
'len(())'
if
len
(())
!=
0
:
raise
TestFailed
,
'len(())'
...
...
Lib/textwrap.py
Dosyayı görüntüle @
c411dbae
...
@@ -48,7 +48,7 @@ class TextWrapper:
...
@@ -48,7 +48,7 @@ class TextWrapper:
whitespace_trans
=
string
.
maketrans
(
string
.
whitespace
,
whitespace_trans
=
string
.
maketrans
(
string
.
whitespace
,
' '
*
len
(
string
.
whitespace
))
' '
*
len
(
string
.
whitespace
))
# This funky little regex is just the trick for splitting
# This funky little regex is just the trick for splitting
# text up into word-wrappable chunks. E.g.
# text up into word-wrappable chunks. E.g.
# "Hello there -- you goof-ball, use the -b option!"
# "Hello there -- you goof-ball, use the -b option!"
# splits into
# splits into
...
@@ -81,7 +81,7 @@ class TextWrapper:
...
@@ -81,7 +81,7 @@ class TextWrapper:
self
.
replace_whitespace
=
replace_whitespace
self
.
replace_whitespace
=
replace_whitespace
self
.
fix_sentence_endings
=
fix_sentence_endings
self
.
fix_sentence_endings
=
fix_sentence_endings
self
.
break_long_words
=
break_long_words
self
.
break_long_words
=
break_long_words
# -- Private methods -----------------------------------------------
# -- Private methods -----------------------------------------------
# (possibly useful for subclasses to override)
# (possibly useful for subclasses to override)
...
@@ -209,7 +209,7 @@ class TextWrapper:
...
@@ -209,7 +209,7 @@ class TextWrapper:
break
break
# The current line is full, and the next chunk is too big to
# The current line is full, and the next chunk is too big to
# fit on *any* line (not just this one).
# fit on *any* line (not just this one).
if
chunks
and
len
(
chunks
[
0
])
>
width
:
if
chunks
and
len
(
chunks
[
0
])
>
width
:
self
.
_handle_long_word
(
chunks
,
cur_line
,
cur_len
,
width
)
self
.
_handle_long_word
(
chunks
,
cur_line
,
cur_len
,
width
)
...
...
Lib/urllib2.py
Dosyayı görüntüle @
c411dbae
...
@@ -165,7 +165,7 @@ class HTTPError(URLError, addinfourl):
...
@@ -165,7 +165,7 @@ class HTTPError(URLError, addinfourl):
# The addinfourl classes depend on fp being a valid file
# The addinfourl classes depend on fp being a valid file
# object. In some cases, the HTTPError may not have a valid
# object. In some cases, the HTTPError may not have a valid
# file object. If this happens, the simplest workaround is to
# file object. If this happens, the simplest workaround is to
# not initialize the base classes.
# not initialize the base classes.
if
fp
is
not
None
:
if
fp
is
not
None
:
self
.
__super_init
(
fp
,
hdrs
,
url
)
self
.
__super_init
(
fp
,
hdrs
,
url
)
...
@@ -460,7 +460,7 @@ class ProxyHandler(BaseHandler):
...
@@ -460,7 +460,7 @@ class ProxyHandler(BaseHandler):
user_pass
,
host
=
host
.
split
(
'@'
,
1
)
user_pass
,
host
=
host
.
split
(
'@'
,
1
)
if
':'
in
user_pass
:
if
':'
in
user_pass
:
user
,
password
=
user_pass
.
split
(
':'
,
1
)
user
,
password
=
user_pass
.
split
(
':'
,
1
)
user_pass
=
base64
.
encodestring
(
'
%
s:
%
s'
%
(
unquote
(
user
),
user_pass
=
base64
.
encodestring
(
'
%
s:
%
s'
%
(
unquote
(
user
),
unquote
(
password
)))
unquote
(
password
)))
req
.
add_header
(
'Proxy-Authorization'
,
'Basic '
+
user_pass
)
req
.
add_header
(
'Proxy-Authorization'
,
'Basic '
+
user_pass
)
host
=
unquote
(
host
)
host
=
unquote
(
host
)
...
...
Lib/weakref.py
Dosyayı görüntüle @
c411dbae
...
@@ -191,7 +191,7 @@ class WeakKeyDictionary(UserDict.UserDict):
...
@@ -191,7 +191,7 @@ class WeakKeyDictionary(UserDict.UserDict):
except
TypeError
:
except
TypeError
:
return
0
return
0
return
wr
in
self
.
data
return
wr
in
self
.
data
def
items
(
self
):
def
items
(
self
):
L
=
[]
L
=
[]
for
key
,
value
in
self
.
data
.
items
():
for
key
,
value
in
self
.
data
.
items
():
...
...
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