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
9eb54d98
Kaydet (Commit)
9eb54d98
authored
Şub 09, 2001
tarafından
Eric S. Raymond
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
String method conversion.
üst
b49f4a4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
ConfigParser.py
Lib/ConfigParser.py
+8
-8
No files found.
Lib/ConfigParser.py
Dosyayı görüntüle @
9eb54d98
...
...
@@ -293,7 +293,7 @@ class ConfigParser:
depth
=
0
while
depth
<
10
:
# Loop through this until it's done
depth
=
depth
+
1
if
string
.
find
(
value
,
"
%
("
)
>=
0
:
if
value
.
find
(
"
%
("
)
>=
0
:
try
:
value
=
value
%
d
except
KeyError
,
key
:
...
...
@@ -315,13 +315,13 @@ class ConfigParser:
def
getboolean
(
self
,
section
,
option
):
v
=
self
.
get
(
section
,
option
)
val
=
string
.
atoi
(
v
)
val
=
v
.
atoi
(
)
if
val
not
in
(
0
,
1
):
raise
ValueError
,
'Not a boolean:
%
s'
%
v
return
val
def
optionxform
(
self
,
optionstr
):
return
string
.
lower
(
optionstr
)
return
optionstr
.
lower
(
)
def
has_option
(
self
,
section
,
option
):
"""Check for the existence of a given option in a given section."""
...
...
@@ -419,14 +419,14 @@ class ConfigParser:
break
lineno
=
lineno
+
1
# comment or blank line?
if
string
.
strip
(
line
)
==
''
or
line
[
0
]
in
'#;'
:
if
line
.
strip
(
)
==
''
or
line
[
0
]
in
'#;'
:
continue
if
string
.
lower
(
string
.
split
(
line
)[
0
]
)
==
'rem'
\
if
line
.
split
()[
0
]
.
lower
(
)
==
'rem'
\
and
line
[
0
]
in
"rR"
:
# no leading whitespace
continue
# continuation line?
if
line
[
0
]
in
'
\t
'
and
cursect
is
not
None
and
optname
:
value
=
string
.
strip
(
line
)
value
=
line
.
strip
(
)
if
value
:
cursect
[
optname
]
=
cursect
[
optname
]
+
'
\n
'
+
value
# a section header or option header?
...
...
@@ -455,10 +455,10 @@ class ConfigParser:
if
vi
in
(
'='
,
':'
)
and
';'
in
optval
:
# ';' is a comment delimiter only if it follows
# a spacing character
pos
=
string
.
find
(
optval
,
';'
)
pos
=
optval
.
find
(
';'
)
if
pos
and
optval
[
pos
-
1
]
in
string
.
whitespace
:
optval
=
optval
[:
pos
]
optval
=
string
.
strip
(
optval
)
optval
=
optval
.
strip
(
)
# allow empty values
if
optval
==
'""'
:
optval
=
''
...
...
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