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
31ce5cb9
Kaydet (Commit)
31ce5cb9
authored
Şub 21, 2008
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Update more instances of has_key().
üst
8982cf54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
UserDict.py
Lib/UserDict.py
+2
-2
shelve.py
Lib/shelve.py
+3
-3
No files found.
Lib/UserDict.py
Dosyayı görüntüle @
31ce5cb9
...
@@ -41,7 +41,7 @@ class UserDict:
...
@@ -41,7 +41,7 @@ class UserDict:
def
iterkeys
(
self
):
return
self
.
data
.
iterkeys
()
def
iterkeys
(
self
):
return
self
.
data
.
iterkeys
()
def
itervalues
(
self
):
return
self
.
data
.
itervalues
()
def
itervalues
(
self
):
return
self
.
data
.
itervalues
()
def
values
(
self
):
return
self
.
data
.
values
()
def
values
(
self
):
return
self
.
data
.
values
()
def
has_key
(
self
,
key
):
return
self
.
data
.
has_key
(
key
)
def
has_key
(
self
,
key
):
return
key
in
self
.
data
def
update
(
self
,
dict
=
None
,
**
kwargs
):
def
update
(
self
,
dict
=
None
,
**
kwargs
):
if
dict
is
None
:
if
dict
is
None
:
pass
pass
...
@@ -59,7 +59,7 @@ class UserDict:
...
@@ -59,7 +59,7 @@ class UserDict:
return
failobj
return
failobj
return
self
[
key
]
return
self
[
key
]
def
setdefault
(
self
,
key
,
failobj
=
None
):
def
setdefault
(
self
,
key
,
failobj
=
None
):
if
not
self
.
has_key
(
key
)
:
if
key
not
in
self
:
self
[
key
]
=
failobj
self
[
key
]
=
failobj
return
self
[
key
]
return
self
[
key
]
def
pop
(
self
,
key
,
*
args
):
def
pop
(
self
,
key
,
*
args
):
...
...
Lib/shelve.py
Dosyayı görüntüle @
31ce5cb9
...
@@ -95,13 +95,13 @@ class Shelf(UserDict.DictMixin):
...
@@ -95,13 +95,13 @@ class Shelf(UserDict.DictMixin):
return
len
(
self
.
dict
)
return
len
(
self
.
dict
)
def
has_key
(
self
,
key
):
def
has_key
(
self
,
key
):
return
self
.
dict
.
has_key
(
key
)
return
key
in
self
.
dict
def
__contains__
(
self
,
key
):
def
__contains__
(
self
,
key
):
return
self
.
dict
.
has_key
(
key
)
return
key
in
self
.
dict
def
get
(
self
,
key
,
default
=
None
):
def
get
(
self
,
key
,
default
=
None
):
if
self
.
dict
.
has_key
(
key
)
:
if
key
in
self
.
dict
:
return
self
[
key
]
return
self
[
key
]
return
default
return
default
...
...
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