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
c8e81ef5
Kaydet (Commit)
c8e81ef5
authored
Mar 19, 2009
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix typo
üst
e980d2d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
collections.py
Lib/collections.py
+2
-2
No files found.
Lib/collections.py
Dosyayı görüntüle @
c8e81ef5
...
@@ -23,13 +23,13 @@ class OrderedDict(dict, MutableMapping):
...
@@ -23,13 +23,13 @@ class OrderedDict(dict, MutableMapping):
# The internal self.__map dictionary maps keys to links in a doubly linked list.
# The internal self.__map dictionary maps keys to links in a doubly linked list.
# The doubly linked list starts and ends with a sentinel element.
# The doubly linked list starts and ends with a sentinel element.
# The sentinel element never gets deleted. It simplifies the algorithm.
# The sentinel element never gets deleted. It simplifies the algorithm.
# Setting a new item cause a new link to append to the doubly linked list.
# Setting a new item cause
s
a new link to append to the doubly linked list.
# Deleting an item uses self.__map to find the link, which is then removed.
# Deleting an item uses self.__map to find the link, which is then removed.
# Iteration follows the linked list in order.
# Iteration follows the linked list in order.
# Reverse iteration follows the links backwards.
# Reverse iteration follows the links backwards.
# The inherited dict provides __getitem__, __len__, __contains__, and get.
# The inherited dict provides __getitem__, __len__, __contains__, and get.
# The remaining methods are order-aware.
# The remaining methods are order-aware.
# Big-Oh running times for all methods
is
the same as for regular dictionaries.
# Big-Oh running times for all methods
are
the same as for regular dictionaries.
def
__init__
(
self
,
*
args
,
**
kwds
):
def
__init__
(
self
,
*
args
,
**
kwds
):
if
len
(
args
)
>
1
:
if
len
(
args
)
>
1
:
...
...
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