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
16e3c427
Kaydet (Commit)
16e3c427
authored
Haz 01, 2002
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace boolean test with is None.
üst
793d4b49
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
12 additions
and
12 deletions
+12
-12
mhlib.py
Lib/mhlib.py
+5
-5
netrc.py
Lib/netrc.py
+1
-1
poplib.py
Lib/poplib.py
+2
-2
pprint.py
Lib/pprint.py
+1
-1
profile.py
Lib/profile.py
+1
-1
pstats.py
Lib/pstats.py
+1
-1
py_compile.py
Lib/py_compile.py
+1
-1
No files found.
Lib/mhlib.py
Dosyayı görüntüle @
16e3c427
...
@@ -98,9 +98,9 @@ class MH:
...
@@ -98,9 +98,9 @@ class MH:
def
__init__
(
self
,
path
=
None
,
profile
=
None
):
def
__init__
(
self
,
path
=
None
,
profile
=
None
):
"""Constructor."""
"""Constructor."""
if
not
profil
e
:
profile
=
MH_PROFILE
if
profile
is
Non
e
:
profile
=
MH_PROFILE
self
.
profile
=
os
.
path
.
expanduser
(
profile
)
self
.
profile
=
os
.
path
.
expanduser
(
profile
)
if
not
path
:
path
=
self
.
getprofile
(
'Path'
)
if
path
is
None
:
path
=
self
.
getprofile
(
'Path'
)
if
not
path
:
path
=
PATH
if
not
path
:
path
=
PATH
if
not
os
.
path
.
isabs
(
path
)
and
path
[
0
]
!=
'~'
:
if
not
os
.
path
.
isabs
(
path
)
and
path
[
0
]
!=
'~'
:
path
=
os
.
path
.
join
(
'~'
,
path
)
path
=
os
.
path
.
join
(
'~'
,
path
)
...
@@ -665,7 +665,7 @@ class Message(mimetools.Message):
...
@@ -665,7 +665,7 @@ class Message(mimetools.Message):
"""Constructor."""
"""Constructor."""
self
.
folder
=
f
self
.
folder
=
f
self
.
number
=
n
self
.
number
=
n
if
not
fp
:
if
fp
is
None
:
path
=
f
.
getmessagefilename
(
n
)
path
=
f
.
getmessagefilename
(
n
)
fp
=
open
(
path
,
'r'
)
fp
=
open
(
path
,
'r'
)
mimetools
.
Message
.
__init__
(
self
,
fp
)
mimetools
.
Message
.
__init__
(
self
,
fp
)
...
@@ -679,7 +679,7 @@ class Message(mimetools.Message):
...
@@ -679,7 +679,7 @@ class Message(mimetools.Message):
argument is specified, it is used as a filter predicate to
argument is specified, it is used as a filter predicate to
decide which headers to return (its argument is the header
decide which headers to return (its argument is the header
name converted to lower case)."""
name converted to lower case)."""
if
not
pred
:
if
pred
is
None
:
return
''
.
join
(
self
.
headers
)
return
''
.
join
(
self
.
headers
)
headers
=
[]
headers
=
[]
hit
=
0
hit
=
0
...
@@ -791,7 +791,7 @@ class IntSet:
...
@@ -791,7 +791,7 @@ class IntSet:
self
.
pairs
=
[]
self
.
pairs
=
[]
self
.
sep
=
sep
self
.
sep
=
sep
self
.
rng
=
rng
self
.
rng
=
rng
if
data
:
self
.
fromstring
(
data
)
if
data
is
not
None
:
self
.
fromstring
(
data
)
def
reset
(
self
):
def
reset
(
self
):
self
.
pairs
=
[]
self
.
pairs
=
[]
...
...
Lib/netrc.py
Dosyayı görüntüle @
16e3c427
...
@@ -21,7 +21,7 @@ class NetrcParseError(Exception):
...
@@ -21,7 +21,7 @@ class NetrcParseError(Exception):
class
netrc
:
class
netrc
:
def
__init__
(
self
,
file
=
None
):
def
__init__
(
self
,
file
=
None
):
if
not
fil
e
:
if
file
is
Non
e
:
try
:
try
:
file
=
os
.
path
.
join
(
os
.
environ
[
'HOME'
],
".netrc"
)
file
=
os
.
path
.
join
(
os
.
environ
[
'HOME'
],
".netrc"
)
except
KeyError
:
except
KeyError
:
...
...
Lib/poplib.py
Dosyayı görüntüle @
16e3c427
...
@@ -220,7 +220,7 @@ class POP3:
...
@@ -220,7 +220,7 @@ class POP3:
Result when a message number argument is given is a
Result when a message number argument is given is a
single response: the "scan listing" for that message.
single response: the "scan listing" for that message.
"""
"""
if
which
:
if
which
is
not
None
:
return
self
.
_shortcmd
(
'LIST
%
s'
%
which
)
return
self
.
_shortcmd
(
'LIST
%
s'
%
which
)
return
self
.
_longcmd
(
'LIST'
)
return
self
.
_longcmd
(
'LIST'
)
...
@@ -313,7 +313,7 @@ class POP3:
...
@@ -313,7 +313,7 @@ class POP3:
in the form 'response mesgnum uid', otherwise result is
in the form 'response mesgnum uid', otherwise result is
the list ['response', ['mesgnum uid', ...], octets]
the list ['response', ['mesgnum uid', ...], octets]
"""
"""
if
which
:
if
which
is
not
None
:
return
self
.
_shortcmd
(
'UIDL
%
s'
%
which
)
return
self
.
_shortcmd
(
'UIDL
%
s'
%
which
)
return
self
.
_longcmd
(
'UIDL'
)
return
self
.
_longcmd
(
'UIDL'
)
...
...
Lib/pprint.py
Dosyayı görüntüle @
16e3c427
...
@@ -101,7 +101,7 @@ class PrettyPrinter:
...
@@ -101,7 +101,7 @@ class PrettyPrinter:
self
.
__depth
=
depth
self
.
__depth
=
depth
self
.
__indent_per_level
=
indent
self
.
__indent_per_level
=
indent
self
.
__width
=
width
self
.
__width
=
width
if
stream
:
if
stream
is
not
None
:
self
.
__stream
=
stream
self
.
__stream
=
stream
else
:
else
:
self
.
__stream
=
sys
.
stdout
self
.
__stream
=
sys
.
stdout
...
...
Lib/profile.py
Dosyayı görüntüle @
16e3c427
...
@@ -150,7 +150,7 @@ class Profile:
...
@@ -150,7 +150,7 @@ class Profile:
bias
=
self
.
bias
bias
=
self
.
bias
self
.
bias
=
bias
# Materialize in local dict for lookup speed.
self
.
bias
=
bias
# Materialize in local dict for lookup speed.
if
not
timer
:
if
timer
is
None
:
if
os
.
name
==
'mac'
:
if
os
.
name
==
'mac'
:
self
.
timer
=
MacOS
.
GetTicks
self
.
timer
=
MacOS
.
GetTicks
self
.
dispatcher
=
self
.
trace_dispatch_mac
self
.
dispatcher
=
self
.
trace_dispatch_mac
...
...
Lib/pstats.py
Dosyayı görüntüle @
16e3c427
...
@@ -506,7 +506,7 @@ if __name__ == '__main__':
...
@@ -506,7 +506,7 @@ if __name__ == '__main__':
def
__init__
(
self
,
profile
=
None
):
def
__init__
(
self
,
profile
=
None
):
cmd
.
Cmd
.
__init__
(
self
)
cmd
.
Cmd
.
__init__
(
self
)
self
.
prompt
=
"
%
"
self
.
prompt
=
"
%
"
if
profile
:
if
profile
is
not
None
:
self
.
stats
=
Stats
(
profile
)
self
.
stats
=
Stats
(
profile
)
else
:
else
:
self
.
stats
=
None
self
.
stats
=
None
...
...
Lib/py_compile.py
Dosyayı görüntüle @
16e3c427
...
@@ -67,7 +67,7 @@ def compile(file, cfile=None, dfile=None):
...
@@ -67,7 +67,7 @@ def compile(file, cfile=None, dfile=None):
sys
.
stderr
.
write
(
line
.
replace
(
'File "<string>"'
,
sys
.
stderr
.
write
(
line
.
replace
(
'File "<string>"'
,
'File "
%
s"'
%
(
dfile
or
file
)))
'File "
%
s"'
%
(
dfile
or
file
)))
return
return
if
not
cfil
e
:
if
cfile
is
Non
e
:
cfile
=
file
+
(
__debug__
and
'c'
or
'o'
)
cfile
=
file
+
(
__debug__
and
'c'
or
'o'
)
fc
=
open
(
cfile
,
'wb'
)
fc
=
open
(
cfile
,
'wb'
)
fc
.
write
(
'
\0\0\0\0
'
)
fc
.
write
(
'
\0\0\0\0
'
)
...
...
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