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
60fbf7f8
Kaydet (Commit)
60fbf7f8
authored
Haz 07, 2008
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#3057: Fix the MutableMapping ABC to use the 2.6 dict interface.
üst
3bed4aee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
9 deletions
+14
-9
_abcoll.py
Lib/_abcoll.py
+14
-9
No files found.
Lib/_abcoll.py
Dosyayı görüntüle @
60fbf7f8
...
@@ -329,14 +329,25 @@ class Mapping(Sized, Iterable, Container):
...
@@ -329,14 +329,25 @@ class Mapping(Sized, Iterable, Container):
else
:
else
:
return
True
return
True
def
iterkeys
(
self
):
return
iter
(
self
)
def
itervalues
(
self
):
for
key
in
self
:
yield
self
[
key
]
def
iteritems
(
self
):
for
key
in
self
:
yield
(
key
,
self
[
key
])
def
keys
(
self
):
def
keys
(
self
):
return
KeysView
(
self
)
return
list
(
self
)
def
items
(
self
):
def
items
(
self
):
return
ItemsView
(
self
)
return
[(
key
,
self
[
key
])
for
key
in
self
]
def
values
(
self
):
def
values
(
self
):
return
ValuesView
(
self
)
return
[
self
[
key
]
for
key
in
self
]
def
__eq__
(
self
,
other
):
def
__eq__
(
self
,
other
):
return
isinstance
(
other
,
Mapping
)
and
\
return
isinstance
(
other
,
Mapping
)
and
\
...
@@ -363,8 +374,6 @@ class KeysView(MappingView, Set):
...
@@ -363,8 +374,6 @@ class KeysView(MappingView, Set):
for
key
in
self
.
_mapping
:
for
key
in
self
.
_mapping
:
yield
key
yield
key
KeysView
.
register
(
type
({}
.
keys
()))
class
ItemsView
(
MappingView
,
Set
):
class
ItemsView
(
MappingView
,
Set
):
...
@@ -381,8 +390,6 @@ class ItemsView(MappingView, Set):
...
@@ -381,8 +390,6 @@ class ItemsView(MappingView, Set):
for
key
in
self
.
_mapping
:
for
key
in
self
.
_mapping
:
yield
(
key
,
self
.
_mapping
[
key
])
yield
(
key
,
self
.
_mapping
[
key
])
ItemsView
.
register
(
type
({}
.
items
()))
class
ValuesView
(
MappingView
):
class
ValuesView
(
MappingView
):
...
@@ -396,8 +403,6 @@ class ValuesView(MappingView):
...
@@ -396,8 +403,6 @@ class ValuesView(MappingView):
for
key
in
self
.
_mapping
:
for
key
in
self
.
_mapping
:
yield
self
.
_mapping
[
key
]
yield
self
.
_mapping
[
key
]
ValuesView
.
register
(
type
({}
.
values
()))
class
MutableMapping
(
Mapping
):
class
MutableMapping
(
Mapping
):
...
...
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