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
f680cc46
Kaydet (Commit)
f680cc46
authored
Ara 17, 2002
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Update doc for getboolean() to match code (ie, returning True/False)
Convert remaining uses of 1/0 to True/False
üst
212b43f9
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 @
f680cc46
...
@@ -52,7 +52,7 @@ ConfigParser -- responsible for for parsing a list of
...
@@ -52,7 +52,7 @@ ConfigParser -- responsible for for parsing a list of
The filename defaults to fp.name; it is only used in error
The filename defaults to fp.name; it is only used in error
messages (if fp has no `name' attribute, the string `<???>' is used).
messages (if fp has no `name' attribute, the string `<???>' is used).
get(section, option, raw=
0
, vars=None)
get(section, option, raw=
False
, vars=None)
return a string value for the named option. All
%
interpolations are
return a string value for the named option. All
%
interpolations are
expanded in the return values, based on the defaults passed into the
expanded in the return values, based on the defaults passed into the
constructor and the DEFAULT section. Additional substitutions may be
constructor and the DEFAULT section. Additional substitutions may be
...
@@ -67,10 +67,10 @@ ConfigParser -- responsible for for parsing a list of
...
@@ -67,10 +67,10 @@ ConfigParser -- responsible for for parsing a list of
getboolean(section, options)
getboolean(section, options)
like get(), but convert value to a boolean (currently case
like get(), but convert value to a boolean (currently case
insensitively defined as 0, false, no, off for
0
, and 1, true,
insensitively defined as 0, false, no, off for
False
, and 1, true,
yes, on for
1). Returns 0 or 1
.
yes, on for
True). Returns False or True
.
items(section, raw=
0
, vars=None)
items(section, raw=
False
, vars=None)
return a list of tuples with (name, value) for each option
return a list of tuples with (name, value) for each option
in the section.
in the section.
...
@@ -308,7 +308,7 @@ class RawConfigParser:
...
@@ -308,7 +308,7 @@ class RawConfigParser:
option
=
self
.
optionxform
(
option
)
option
=
self
.
optionxform
(
option
)
return
option
in
self
.
_defaults
return
option
in
self
.
_defaults
elif
section
not
in
self
.
_sections
:
elif
section
not
in
self
.
_sections
:
return
0
return
False
else
:
else
:
option
=
self
.
optionxform
(
option
)
option
=
self
.
optionxform
(
option
)
return
(
option
in
self
.
_sections
[
section
]
return
(
option
in
self
.
_sections
[
section
]
...
@@ -393,7 +393,7 @@ class RawConfigParser:
...
@@ -393,7 +393,7 @@ class RawConfigParser:
optname
=
None
optname
=
None
lineno
=
0
lineno
=
0
e
=
None
# None, or an exception
e
=
None
# None, or an exception
while
1
:
while
True
:
line
=
fp
.
readline
()
line
=
fp
.
readline
()
if
not
line
:
if
not
line
:
break
break
...
@@ -459,7 +459,7 @@ class RawConfigParser:
...
@@ -459,7 +459,7 @@ class RawConfigParser:
class
ConfigParser
(
RawConfigParser
):
class
ConfigParser
(
RawConfigParser
):
def
get
(
self
,
section
,
option
,
raw
=
0
,
vars
=
None
):
def
get
(
self
,
section
,
option
,
raw
=
False
,
vars
=
None
):
"""Get an option value for a given section.
"""Get an option value for a given section.
All
%
interpolations are expanded in the return values, based on the
All
%
interpolations are expanded in the return values, based on the
...
@@ -490,7 +490,7 @@ class ConfigParser(RawConfigParser):
...
@@ -490,7 +490,7 @@ class ConfigParser(RawConfigParser):
else
:
else
:
return
self
.
_interpolate
(
section
,
option
,
value
,
d
)
return
self
.
_interpolate
(
section
,
option
,
value
,
d
)
def
items
(
self
,
section
,
raw
=
0
,
vars
=
None
):
def
items
(
self
,
section
,
raw
=
False
,
vars
=
None
):
"""Return a list of tuples with (name, value) for each option
"""Return a list of tuples with (name, value) for each option
in the section.
in the section.
...
...
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