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
f13eb55d
Kaydet (Commit)
f13eb55d
authored
Haz 02, 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
1931ca72
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
10 deletions
+10
-10
sgmllib.py
Lib/sgmllib.py
+1
-1
shlex.py
Lib/shlex.py
+4
-4
shutil.py
Lib/shutil.py
+1
-1
smtplib.py
Lib/smtplib.py
+1
-1
sre_compile.py
Lib/sre_compile.py
+1
-1
sre_parse.py
Lib/sre_parse.py
+2
-2
No files found.
Lib/sgmllib.py
Dosyayı görüntüle @
f13eb55d
...
@@ -479,7 +479,7 @@ class TestSGMLParser(SGMLParser):
...
@@ -479,7 +479,7 @@ class TestSGMLParser(SGMLParser):
def
test
(
args
=
None
):
def
test
(
args
=
None
):
import
sys
import
sys
if
not
args
:
if
args
is
None
:
args
=
sys
.
argv
[
1
:]
args
=
sys
.
argv
[
1
:]
if
args
and
args
[
0
]
==
'-s'
:
if
args
and
args
[
0
]
==
'-s'
:
...
...
Lib/shlex.py
Dosyayı görüntüle @
f13eb55d
...
@@ -12,7 +12,7 @@ __all__ = ["shlex"]
...
@@ -12,7 +12,7 @@ __all__ = ["shlex"]
class
shlex
:
class
shlex
:
"A lexical analyzer class for simple shell-like syntaxes."
"A lexical analyzer class for simple shell-like syntaxes."
def
__init__
(
self
,
instream
=
None
,
infile
=
None
):
def
__init__
(
self
,
instream
=
None
,
infile
=
None
):
if
instream
:
if
instream
is
not
None
:
self
.
instream
=
instream
self
.
instream
=
instream
self
.
infile
=
infile
self
.
infile
=
infile
else
:
else
:
...
@@ -47,7 +47,7 @@ class shlex:
...
@@ -47,7 +47,7 @@ class shlex:
self
.
instream
=
newstream
self
.
instream
=
newstream
self
.
lineno
=
1
self
.
lineno
=
1
if
self
.
debug
:
if
self
.
debug
:
if
newfile
:
if
newfile
is
not
None
:
print
'shlex: pushing to file
%
s'
%
(
self
.
infile
,)
print
'shlex: pushing to file
%
s'
%
(
self
.
infile
,)
else
:
else
:
print
'shlex: pushing to stream
%
s'
%
(
self
.
instream
,)
print
'shlex: pushing to stream
%
s'
%
(
self
.
instream
,)
...
@@ -188,9 +188,9 @@ class shlex:
...
@@ -188,9 +188,9 @@ class shlex:
def
error_leader
(
self
,
infile
=
None
,
lineno
=
None
):
def
error_leader
(
self
,
infile
=
None
,
lineno
=
None
):
"Emit a C-compiler-like, Emacs-friendly error-message leader."
"Emit a C-compiler-like, Emacs-friendly error-message leader."
if
not
infil
e
:
if
infile
is
Non
e
:
infile
=
self
.
infile
infile
=
self
.
infile
if
not
lineno
:
if
lineno
is
None
:
lineno
=
self
.
lineno
lineno
=
self
.
lineno
return
"
\"
%
s
\"
, line
%
d: "
%
(
infile
,
lineno
)
return
"
\"
%
s
\"
, line
%
d: "
%
(
infile
,
lineno
)
...
...
Lib/shutil.py
Dosyayı görüntüle @
f13eb55d
...
@@ -122,7 +122,7 @@ def rmtree(path, ignore_errors=0, onerror=None):
...
@@ -122,7 +122,7 @@ def rmtree(path, ignore_errors=0, onerror=None):
exc
=
sys
.
exc_info
()
exc
=
sys
.
exc_info
()
if
ignore_errors
:
if
ignore_errors
:
pass
pass
elif
onerror
:
elif
onerror
is
not
None
:
onerror
(
cmd
[
0
],
cmd
[
1
],
exc
)
onerror
(
cmd
[
0
],
cmd
[
1
],
exc
)
else
:
else
:
raise
exc
[
0
],
(
exc
[
1
][
0
],
exc
[
1
][
1
]
+
' removing '
+
cmd
[
1
])
raise
exc
[
0
],
(
exc
[
1
][
0
],
exc
[
1
][
1
]
+
' removing '
+
cmd
[
1
])
...
...
Lib/smtplib.py
Dosyayı görüntüle @
f13eb55d
...
@@ -236,7 +236,7 @@ class SMTP:
...
@@ -236,7 +236,7 @@ class SMTP:
(
code
,
msg
)
=
self
.
connect
(
host
,
port
)
(
code
,
msg
)
=
self
.
connect
(
host
,
port
)
if
code
!=
220
:
if
code
!=
220
:
raise
SMTPConnectError
(
code
,
msg
)
raise
SMTPConnectError
(
code
,
msg
)
if
local_hostname
:
if
local_hostname
is
not
None
:
self
.
local_hostname
=
local_hostname
self
.
local_hostname
=
local_hostname
else
:
else
:
# RFC 2821 says we should use the fqdn in the EHLO/HELO verb, and
# RFC 2821 says we should use the fqdn in the EHLO/HELO verb, and
...
...
Lib/sre_compile.py
Dosyayı görüntüle @
f13eb55d
...
@@ -145,7 +145,7 @@ def _compile(code, pattern, flags):
...
@@ -145,7 +145,7 @@ def _compile(code, pattern, flags):
def
_compile_charset
(
charset
,
flags
,
code
,
fixup
=
None
):
def
_compile_charset
(
charset
,
flags
,
code
,
fixup
=
None
):
# compile charset subprogram
# compile charset subprogram
emit
=
code
.
append
emit
=
code
.
append
if
not
fixup
:
if
fixup
is
None
:
fixup
=
lambda
x
:
x
fixup
=
lambda
x
:
x
for
op
,
av
in
_optimize_charset
(
charset
,
fixup
):
for
op
,
av
in
_optimize_charset
(
charset
,
fixup
):
emit
(
OPCODES
[
op
])
emit
(
OPCODES
[
op
])
...
...
Lib/sre_parse.py
Dosyayı görüntüle @
f13eb55d
...
@@ -80,7 +80,7 @@ class Pattern:
...
@@ -80,7 +80,7 @@ class Pattern:
def
opengroup
(
self
,
name
=
None
):
def
opengroup
(
self
,
name
=
None
):
gid
=
self
.
groups
gid
=
self
.
groups
self
.
groups
=
gid
+
1
self
.
groups
=
gid
+
1
if
name
:
if
name
is
not
None
:
ogid
=
self
.
groupdict
.
get
(
name
,
None
)
ogid
=
self
.
groupdict
.
get
(
name
,
None
)
if
ogid
is
not
None
:
if
ogid
is
not
None
:
raise
error
,
(
"redefinition of group name
%
s as group
%
d; "
raise
error
,
(
"redefinition of group name
%
s as group
%
d; "
...
@@ -97,7 +97,7 @@ class SubPattern:
...
@@ -97,7 +97,7 @@ class SubPattern:
# a subpattern, in intermediate form
# a subpattern, in intermediate form
def
__init__
(
self
,
pattern
,
data
=
None
):
def
__init__
(
self
,
pattern
,
data
=
None
):
self
.
pattern
=
pattern
self
.
pattern
=
pattern
if
not
data
:
if
data
is
None
:
data
=
[]
data
=
[]
self
.
data
=
data
self
.
data
=
data
self
.
width
=
None
self
.
width
=
None
...
...
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