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
dbecd93b
Kaydet (Commit)
dbecd93b
authored
Şub 06, 2005
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace list of constants with tuples of constants.
üst
07ead173
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
29 additions
and
29 deletions
+29
-29
cgitb.py
Lib/cgitb.py
+1
-1
cookielib.py
Lib/cookielib.py
+5
-5
decimal.py
Lib/decimal.py
+1
-1
inspect.py
Lib/inspect.py
+5
-5
mhlib.py
Lib/mhlib.py
+2
-2
posixfile.py
Lib/posixfile.py
+2
-2
pydoc.py
Lib/pydoc.py
+9
-9
smtplib.py
Lib/smtplib.py
+1
-1
urllib2.py
Lib/urllib2.py
+1
-1
warnings.py
Lib/warnings.py
+1
-1
whichdb.py
Lib/whichdb.py
+1
-1
No files found.
Lib/cgitb.py
Dosyayı görüntüle @
dbecd93b
...
@@ -146,7 +146,7 @@ function calls leading up to the error, in the order they occurred.</p>'''
...
@@ -146,7 +146,7 @@ function calls leading up to the error, in the order they occurred.</p>'''
if
name
in
done
:
continue
if
name
in
done
:
continue
done
[
name
]
=
1
done
[
name
]
=
1
if
value
is
not
__UNDEF__
:
if
value
is
not
__UNDEF__
:
if
where
in
[
'global'
,
'builtin'
]
:
if
where
in
(
'global'
,
'builtin'
)
:
name
=
(
'<em>
%
s</em> '
%
where
)
+
strong
(
name
)
name
=
(
'<em>
%
s</em> '
%
where
)
+
strong
(
name
)
elif
where
==
'local'
:
elif
where
==
'local'
:
name
=
strong
(
name
)
name
=
strong
(
name
)
...
...
Lib/cookielib.py
Dosyayı görüntüle @
dbecd93b
...
@@ -783,12 +783,12 @@ class Cookie:
...
@@ -783,12 +783,12 @@ class Cookie:
def
__repr__
(
self
):
def
__repr__
(
self
):
args
=
[]
args
=
[]
for
name
in
[
"version"
,
"name"
,
"value"
,
for
name
in
(
"version"
,
"name"
,
"value"
,
"port"
,
"port_specified"
,
"port"
,
"port_specified"
,
"domain"
,
"domain_specified"
,
"domain_initial_dot"
,
"domain"
,
"domain_specified"
,
"domain_initial_dot"
,
"path"
,
"path_specified"
,
"path"
,
"path_specified"
,
"secure"
,
"expires"
,
"discard"
,
"comment"
,
"comment_url"
,
"secure"
,
"expires"
,
"discard"
,
"comment"
,
"comment_url"
,
]
:
)
:
attr
=
getattr
(
self
,
name
)
attr
=
getattr
(
self
,
name
)
args
.
append
(
"
%
s=
%
s"
%
(
name
,
repr
(
attr
)))
args
.
append
(
"
%
s=
%
s"
%
(
name
,
repr
(
attr
)))
args
.
append
(
"rest=
%
s"
%
repr
(
self
.
_rest
))
args
.
append
(
"rest=
%
s"
%
repr
(
self
.
_rest
))
...
@@ -981,9 +981,9 @@ class DefaultCookiePolicy(CookiePolicy):
...
@@ -981,9 +981,9 @@ class DefaultCookiePolicy(CookiePolicy):
if
j
==
0
:
# domain like .foo.bar
if
j
==
0
:
# domain like .foo.bar
tld
=
domain
[
i
+
1
:]
tld
=
domain
[
i
+
1
:]
sld
=
domain
[
j
+
1
:
i
]
sld
=
domain
[
j
+
1
:
i
]
if
(
sld
.
lower
()
in
[
if
(
sld
.
lower
()
in
(
"co"
,
"ac"
,
"co"
,
"ac"
,
"com"
,
"edu"
,
"org"
,
"net"
,
"gov"
,
"mil"
,
"int"
]
and
"com"
,
"edu"
,
"org"
,
"net"
,
"gov"
,
"mil"
,
"int"
)
and
len
(
tld
)
==
2
):
len
(
tld
)
==
2
):
# domain like .co.uk
# domain like .co.uk
debug
(
" country-code second level domain
%
s"
,
domain
)
debug
(
" country-code second level domain
%
s"
,
domain
)
...
@@ -1415,7 +1415,7 @@ class CookieJar:
...
@@ -1415,7 +1415,7 @@ class CookieJar:
v
=
self
.
_now
+
v
v
=
self
.
_now
+
v
if
(
k
in
value_attrs
)
or
(
k
in
boolean_attrs
):
if
(
k
in
value_attrs
)
or
(
k
in
boolean_attrs
):
if
(
v
is
None
and
if
(
v
is
None
and
k
not
in
[
"port"
,
"comment"
,
"commenturl"
]
):
k
not
in
(
"port"
,
"comment"
,
"commenturl"
)
):
debug
(
" missing value for
%
s attribute"
%
k
)
debug
(
" missing value for
%
s attribute"
%
k
)
bad_cookie
=
True
bad_cookie
=
True
break
break
...
...
Lib/decimal.py
Dosyayı görüntüle @
dbecd93b
...
@@ -515,7 +515,7 @@ class Decimal(object):
...
@@ -515,7 +515,7 @@ class Decimal(object):
if
isinstance
(
value
,
(
list
,
tuple
)):
if
isinstance
(
value
,
(
list
,
tuple
)):
if
len
(
value
)
!=
3
:
if
len
(
value
)
!=
3
:
raise
ValueError
,
'Invalid arguments'
raise
ValueError
,
'Invalid arguments'
if
value
[
0
]
not
in
[
0
,
1
]
:
if
value
[
0
]
not
in
(
0
,
1
)
:
raise
ValueError
,
'Invalid sign'
raise
ValueError
,
'Invalid sign'
for
digit
in
value
[
1
]:
for
digit
in
value
[
1
]:
if
not
isinstance
(
digit
,
(
int
,
long
))
or
digit
<
0
:
if
not
isinstance
(
digit
,
(
int
,
long
))
or
digit
<
0
:
...
...
Lib/inspect.py
Dosyayı görüntüle @
dbecd93b
...
@@ -346,7 +346,7 @@ def getmodulename(path):
...
@@ -346,7 +346,7 @@ def getmodulename(path):
def
getsourcefile
(
object
):
def
getsourcefile
(
object
):
"""Return the Python source file an object was defined in, if it exists."""
"""Return the Python source file an object was defined in, if it exists."""
filename
=
getfile
(
object
)
filename
=
getfile
(
object
)
if
string
.
lower
(
filename
[
-
4
:])
in
[
'.pyc'
,
'.pyo'
]
:
if
string
.
lower
(
filename
[
-
4
:])
in
(
'.pyc'
,
'.pyo'
)
:
filename
=
filename
[:
-
4
]
+
'.py'
filename
=
filename
[:
-
4
]
+
'.py'
for
suffix
,
mode
,
kind
in
imp
.
get_suffixes
():
for
suffix
,
mode
,
kind
in
imp
.
get_suffixes
():
if
'b'
in
mode
and
string
.
lower
(
filename
[
-
len
(
suffix
):])
==
suffix
:
if
'b'
in
mode
and
string
.
lower
(
filename
[
-
len
(
suffix
):])
==
suffix
:
...
@@ -453,7 +453,7 @@ def getcomments(object):
...
@@ -453,7 +453,7 @@ def getcomments(object):
# Look for a comment block at the top of the file.
# Look for a comment block at the top of the file.
start
=
0
start
=
0
if
lines
and
lines
[
0
][:
2
]
==
'#!'
:
start
=
1
if
lines
and
lines
[
0
][:
2
]
==
'#!'
:
start
=
1
while
start
<
len
(
lines
)
and
string
.
strip
(
lines
[
start
])
in
[
''
,
'#'
]
:
while
start
<
len
(
lines
)
and
string
.
strip
(
lines
[
start
])
in
(
''
,
'#'
)
:
start
=
start
+
1
start
=
start
+
1
if
start
<
len
(
lines
)
and
lines
[
start
][:
1
]
==
'#'
:
if
start
<
len
(
lines
)
and
lines
[
start
][:
1
]
==
'#'
:
comments
=
[]
comments
=
[]
...
@@ -621,7 +621,7 @@ def getargs(co):
...
@@ -621,7 +621,7 @@ def getargs(co):
# The following acrobatics are for anonymous (tuple) arguments.
# The following acrobatics are for anonymous (tuple) arguments.
for
i
in
range
(
nargs
):
for
i
in
range
(
nargs
):
if
args
[
i
][:
1
]
in
[
''
,
'.'
]
:
if
args
[
i
][:
1
]
in
(
''
,
'.'
)
:
stack
,
remain
,
count
=
[],
[],
[]
stack
,
remain
,
count
=
[],
[],
[]
while
step
<
len
(
code
):
while
step
<
len
(
code
):
op
=
ord
(
code
[
step
])
op
=
ord
(
code
[
step
])
...
@@ -630,7 +630,7 @@ def getargs(co):
...
@@ -630,7 +630,7 @@ def getargs(co):
opname
=
dis
.
opname
[
op
]
opname
=
dis
.
opname
[
op
]
value
=
ord
(
code
[
step
])
+
ord
(
code
[
step
+
1
])
*
256
value
=
ord
(
code
[
step
])
+
ord
(
code
[
step
+
1
])
*
256
step
=
step
+
2
step
=
step
+
2
if
opname
in
[
'UNPACK_TUPLE'
,
'UNPACK_SEQUENCE'
]
:
if
opname
in
(
'UNPACK_TUPLE'
,
'UNPACK_SEQUENCE'
)
:
remain
.
append
(
value
)
remain
.
append
(
value
)
count
.
append
(
value
)
count
.
append
(
value
)
elif
opname
==
'STORE_FAST'
:
elif
opname
==
'STORE_FAST'
:
...
@@ -696,7 +696,7 @@ def joinseq(seq):
...
@@ -696,7 +696,7 @@ def joinseq(seq):
def
strseq
(
object
,
convert
,
join
=
joinseq
):
def
strseq
(
object
,
convert
,
join
=
joinseq
):
"""Recursively walk a sequence, stringifying each element."""
"""Recursively walk a sequence, stringifying each element."""
if
type
(
object
)
in
[
types
.
ListType
,
types
.
TupleType
]
:
if
type
(
object
)
in
(
list
,
tuple
)
:
return
join
(
map
(
lambda
o
,
c
=
convert
,
j
=
join
:
strseq
(
o
,
c
,
j
),
object
))
return
join
(
map
(
lambda
o
,
c
=
convert
,
j
=
join
:
strseq
(
o
,
c
,
j
),
object
))
else
:
else
:
return
convert
(
object
)
return
convert
(
object
)
...
...
Lib/mhlib.py
Dosyayı görüntüle @
dbecd93b
...
@@ -982,11 +982,11 @@ def test():
...
@@ -982,11 +982,11 @@ def test():
context
=
mh
.
getcontext
()
context
=
mh
.
getcontext
()
f
=
mh
.
openfolder
(
context
)
f
=
mh
.
openfolder
(
context
)
do
(
'f.getcurrent()'
)
do
(
'f.getcurrent()'
)
for
seq
in
[
'first'
,
'last'
,
'cur'
,
'.'
,
'prev'
,
'next'
,
for
seq
in
(
'first'
,
'last'
,
'cur'
,
'.'
,
'prev'
,
'next'
,
'first:3'
,
'last:3'
,
'cur:3'
,
'cur:-3'
,
'first:3'
,
'last:3'
,
'cur:3'
,
'cur:-3'
,
'prev:3'
,
'next:3'
,
'prev:3'
,
'next:3'
,
'1:3'
,
'1:-3'
,
'100:3'
,
'100:-3'
,
'10000:3'
,
'10000:-3'
,
'1:3'
,
'1:-3'
,
'100:3'
,
'100:-3'
,
'10000:3'
,
'10000:-3'
,
'all'
]
:
'all'
)
:
try
:
try
:
do
(
'f.parsesequence(
%
r)'
%
(
seq
,))
do
(
'f.parsesequence(
%
r)'
%
(
seq
,))
except
Error
,
msg
:
except
Error
,
msg
:
...
...
Lib/posixfile.py
Dosyayı görüntüle @
dbecd93b
...
@@ -182,7 +182,7 @@ class _posixfile_:
...
@@ -182,7 +182,7 @@ class _posixfile_:
'freebsd6'
,
'bsdos2'
,
'bsdos3'
,
'bsdos4'
):
'freebsd6'
,
'bsdos2'
,
'bsdos3'
,
'bsdos4'
):
flock
=
struct
.
pack
(
'lxxxxlxxxxlhh'
,
\
flock
=
struct
.
pack
(
'lxxxxlxxxxlhh'
,
\
l_start
,
l_len
,
os
.
getpid
(),
l_type
,
l_whence
)
l_start
,
l_len
,
os
.
getpid
(),
l_type
,
l_whence
)
elif
sys
.
platform
in
[
'aix3'
,
'aix4'
]
:
elif
sys
.
platform
in
(
'aix3'
,
'aix4'
)
:
flock
=
struct
.
pack
(
'hhlllii'
,
\
flock
=
struct
.
pack
(
'hhlllii'
,
\
l_type
,
l_whence
,
l_start
,
l_len
,
0
,
0
,
0
)
l_type
,
l_whence
,
l_start
,
l_len
,
0
,
0
,
0
)
else
:
else
:
...
@@ -198,7 +198,7 @@ class _posixfile_:
...
@@ -198,7 +198,7 @@ class _posixfile_:
'bsdos2'
,
'bsdos3'
,
'bsdos4'
):
'bsdos2'
,
'bsdos3'
,
'bsdos4'
):
l_start
,
l_len
,
l_pid
,
l_type
,
l_whence
=
\
l_start
,
l_len
,
l_pid
,
l_type
,
l_whence
=
\
struct
.
unpack
(
'lxxxxlxxxxlhh'
,
flock
)
struct
.
unpack
(
'lxxxxlxxxxlhh'
,
flock
)
elif
sys
.
platform
in
[
'aix3'
,
'aix4'
]
:
elif
sys
.
platform
in
(
'aix3'
,
'aix4'
)
:
l_type
,
l_whence
,
l_start
,
l_len
,
l_sysid
,
l_pid
,
l_vfs
=
\
l_type
,
l_whence
,
l_start
,
l_len
,
l_sysid
,
l_pid
,
l_vfs
=
\
struct
.
unpack
(
'hhlllii'
,
flock
)
struct
.
unpack
(
'hhlllii'
,
flock
)
elif
sys
.
platform
==
"linux2"
:
elif
sys
.
platform
==
"linux2"
:
...
...
Lib/pydoc.py
Dosyayı görüntüle @
dbecd93b
...
@@ -153,8 +153,8 @@ def _split_list(s, predicate):
...
@@ -153,8 +153,8 @@ def _split_list(s, predicate):
def
visiblename
(
name
,
all
=
None
):
def
visiblename
(
name
,
all
=
None
):
"""Decide whether to show documentation on a variable."""
"""Decide whether to show documentation on a variable."""
# Certain special names are redundant.
# Certain special names are redundant.
if
name
in
[
'__builtins__'
,
'__doc__'
,
'__file__'
,
'__path__'
,
if
name
in
(
'__builtins__'
,
'__doc__'
,
'__file__'
,
'__path__'
,
'__module__'
,
'__name__'
,
'__slots__'
]
:
return
0
'__module__'
,
'__name__'
,
'__slots__'
)
:
return
0
# Private names are hidden, but special names are displayed.
# Private names are hidden, but special names are displayed.
if
name
.
startswith
(
'__'
)
and
name
.
endswith
(
'__'
):
return
1
if
name
.
startswith
(
'__'
)
and
name
.
endswith
(
'__'
):
return
1
if
all
is
not
None
:
if
all
is
not
None
:
...
@@ -176,7 +176,7 @@ def classify_class_attrs(object):
...
@@ -176,7 +176,7 @@ def classify_class_attrs(object):
def
ispackage
(
path
):
def
ispackage
(
path
):
"""Guess whether a path refers to a package directory."""
"""Guess whether a path refers to a package directory."""
if
os
.
path
.
isdir
(
path
):
if
os
.
path
.
isdir
(
path
):
for
ext
in
[
'.py'
,
'.pyc'
,
'.pyo'
]
:
for
ext
in
(
'.py'
,
'.pyc'
,
'.pyo'
)
:
if
os
.
path
.
isfile
(
os
.
path
.
join
(
path
,
'__init__'
+
ext
)):
if
os
.
path
.
isfile
(
os
.
path
.
join
(
path
,
'__init__'
+
ext
)):
return
True
return
True
return
False
return
False
...
@@ -1298,12 +1298,12 @@ def getpager():
...
@@ -1298,12 +1298,12 @@ def getpager():
return
plainpager
return
plainpager
if
not
sys
.
stdin
.
isatty
()
or
not
sys
.
stdout
.
isatty
():
if
not
sys
.
stdin
.
isatty
()
or
not
sys
.
stdout
.
isatty
():
return
plainpager
return
plainpager
if
os
.
environ
.
get
(
'TERM'
)
in
[
'dumb'
,
'emacs'
]
:
if
os
.
environ
.
get
(
'TERM'
)
in
(
'dumb'
,
'emacs'
)
:
return
plainpager
return
plainpager
if
'PAGER'
in
os
.
environ
:
if
'PAGER'
in
os
.
environ
:
if
sys
.
platform
==
'win32'
:
# pipes completely broken in Windows
if
sys
.
platform
==
'win32'
:
# pipes completely broken in Windows
return
lambda
text
:
tempfilepager
(
plain
(
text
),
os
.
environ
[
'PAGER'
])
return
lambda
text
:
tempfilepager
(
plain
(
text
),
os
.
environ
[
'PAGER'
])
elif
os
.
environ
.
get
(
'TERM'
)
in
[
'dumb'
,
'emacs'
]
:
elif
os
.
environ
.
get
(
'TERM'
)
in
(
'dumb'
,
'emacs'
)
:
return
lambda
text
:
pipepager
(
plain
(
text
),
os
.
environ
[
'PAGER'
])
return
lambda
text
:
pipepager
(
plain
(
text
),
os
.
environ
[
'PAGER'
])
else
:
else
:
return
lambda
text
:
pipepager
(
text
,
os
.
environ
[
'PAGER'
])
return
lambda
text
:
pipepager
(
text
,
os
.
environ
[
'PAGER'
])
...
@@ -1369,14 +1369,14 @@ def ttypager(text):
...
@@ -1369,14 +1369,14 @@ def ttypager(text):
sys
.
stdout
.
flush
()
sys
.
stdout
.
flush
()
c
=
getchar
()
c
=
getchar
()
if
c
in
[
'q'
,
'Q'
]
:
if
c
in
(
'q'
,
'Q'
)
:
sys
.
stdout
.
write
(
'
\r
\r
'
)
sys
.
stdout
.
write
(
'
\r
\r
'
)
break
break
elif
c
in
[
'
\r
'
,
'
\n
'
]
:
elif
c
in
(
'
\r
'
,
'
\n
'
)
:
sys
.
stdout
.
write
(
'
\r
\r
'
+
lines
[
r
]
+
'
\n
'
)
sys
.
stdout
.
write
(
'
\r
\r
'
+
lines
[
r
]
+
'
\n
'
)
r
=
r
+
1
r
=
r
+
1
continue
continue
if
c
in
[
'b'
,
'B'
,
'
\x1b
'
]
:
if
c
in
(
'b'
,
'B'
,
'
\x1b
'
)
:
r
=
r
-
inc
-
inc
r
=
r
-
inc
-
inc
if
r
<
0
:
r
=
0
if
r
<
0
:
r
=
0
sys
.
stdout
.
write
(
'
\n
'
+
join
(
lines
[
r
:
r
+
inc
],
'
\n
'
)
+
'
\n
'
)
sys
.
stdout
.
write
(
'
\n
'
+
join
(
lines
[
r
:
r
+
inc
],
'
\n
'
)
+
'
\n
'
)
...
@@ -1646,7 +1646,7 @@ has the same effect as typing a particular string at the help> prompt.
...
@@ -1646,7 +1646,7 @@ has the same effect as typing a particular string at the help> prompt.
except
(
KeyboardInterrupt
,
EOFError
):
except
(
KeyboardInterrupt
,
EOFError
):
break
break
request
=
strip
(
replace
(
request
,
'"'
,
''
,
"'"
,
''
))
request
=
strip
(
replace
(
request
,
'"'
,
''
,
"'"
,
''
))
if
lower
(
request
)
in
[
'q'
,
'quit'
]
:
break
if
lower
(
request
)
in
(
'q'
,
'quit'
)
:
break
self
.
help
(
request
)
self
.
help
(
request
)
def
getline
(
self
,
prompt
):
def
getline
(
self
,
prompt
):
...
...
Lib/smtplib.py
Dosyayı görüntüle @
dbecd93b
...
@@ -578,7 +578,7 @@ class SMTP:
...
@@ -578,7 +578,7 @@ class SMTP:
(
code
,
resp
)
=
self
.
docmd
(
encode_base64
(
password
,
eol
=
""
))
(
code
,
resp
)
=
self
.
docmd
(
encode_base64
(
password
,
eol
=
""
))
elif
authmethod
is
None
:
elif
authmethod
is
None
:
raise
SMTPException
(
"No suitable authentication method found."
)
raise
SMTPException
(
"No suitable authentication method found."
)
if
code
not
in
[
235
,
503
]
:
if
code
not
in
(
235
,
503
)
:
# 235 == 'Authentication successful'
# 235 == 'Authentication successful'
# 503 == 'Error: already authenticated'
# 503 == 'Error: already authenticated'
raise
SMTPAuthenticationError
(
code
,
resp
)
raise
SMTPAuthenticationError
(
code
,
resp
)
...
...
Lib/urllib2.py
Dosyayı görüntüle @
dbecd93b
...
@@ -384,7 +384,7 @@ class OpenerDirector:
...
@@ -384,7 +384,7 @@ class OpenerDirector:
'unknown_open'
,
req
)
'unknown_open'
,
req
)
def
error
(
self
,
proto
,
*
args
):
def
error
(
self
,
proto
,
*
args
):
if
proto
in
[
'http'
,
'https'
]
:
if
proto
in
(
'http'
,
'https'
)
:
# XXX http[s] protocols are special-cased
# XXX http[s] protocols are special-cased
dict
=
self
.
handle_error
[
'http'
]
# https is not different than http
dict
=
self
.
handle_error
[
'http'
]
# https is not different than http
proto
=
args
[
2
]
# YUCK!
proto
=
args
[
2
]
# YUCK!
...
...
Lib/warnings.py
Dosyayı görüntüle @
dbecd93b
...
@@ -216,7 +216,7 @@ def _getaction(action):
...
@@ -216,7 +216,7 @@ def _getaction(action):
if
not
action
:
if
not
action
:
return
"default"
return
"default"
if
action
==
"all"
:
return
"always"
# Alias
if
action
==
"all"
:
return
"always"
# Alias
for
a
in
[
'default'
,
'always'
,
'ignore'
,
'module'
,
'once'
,
'error'
]
:
for
a
in
(
'default'
,
'always'
,
'ignore'
,
'module'
,
'once'
,
'error'
)
:
if
a
.
startswith
(
action
):
if
a
.
startswith
(
action
):
return
a
return
a
raise
_OptionError
(
"invalid action:
%
r"
%
(
action
,))
raise
_OptionError
(
"invalid action:
%
r"
%
(
action
,))
...
...
Lib/whichdb.py
Dosyayı görüntüle @
dbecd93b
...
@@ -62,7 +62,7 @@ def whichdb(filename):
...
@@ -62,7 +62,7 @@ def whichdb(filename):
return
"dumbdbm"
return
"dumbdbm"
f
=
open
(
filename
+
os
.
extsep
+
"dir"
,
"rb"
)
f
=
open
(
filename
+
os
.
extsep
+
"dir"
,
"rb"
)
try
:
try
:
if
f
.
read
(
1
)
in
[
"'"
,
'"'
]
:
if
f
.
read
(
1
)
in
(
"'"
,
'"'
)
:
return
"dumbdbm"
return
"dumbdbm"
finally
:
finally
:
f
.
close
()
f
.
close
()
...
...
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