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
31043cd6
Kaydet (Commit)
31043cd6
authored
Ock 04, 2005
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Clarify that DictMixin is still useful. Only the UserDict class was supplanted.
üst
d61788b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
libuserdict.tex
Doc/lib/libuserdict.tex
+11
-13
No files found.
Doc/lib/libuserdict.tex
Dosyayı görüntüle @
31043cd6
...
...
@@ -4,22 +4,20 @@
\declaremodule
{
standard
}{
UserDict
}
\modulesynopsis
{
Class wrapper for dictionary objects.
}
\note
{
This module is available for backward compatibility only. If
you are writing code that does not need to work with versions of
Python earlier than Python 2.2, please consider subclassing directly
from the built-in
\class
{
dict
}
type.
}
This module defines a class that acts as a wrapper around
dictionary objects. It is a useful base class for
your own dictionary-like classes, which can inherit from
them and override existing methods or add new ones. In this way one
can add new behaviors to dictionaries.
The module also defines a mixin defining all dictionary methods for
classes that already have a minimum mapping interface. This greatly
simplifies writing classes that need to be substitutable for
The module defines a mixin,
\class
{
DictMixin
}
, defining all dictionary
methods for classes that already have a minimum mapping interface. This
greatly simplifies writing classes that need to be substitutable for
dictionaries (such as the shelve module).
This also module defines a class,
\class
{
UserDict
}
, that acts as a wrapper
around dictionary objects. The need for this class has been largely
supplanted by the ability to subclass directly from
\class
{
dict
}
(a feature
that became available starting with Python version 2.2). Prior to the
introduction of
\class
{
dict
}
, the
\class
{
UserDict
}
class was used to
create dictionary-like sub-classes that obtained new behaviors by overriding
existing methods or adding new ones.
The
\module
{
UserDict
}
module defines the
\class
{
UserDict
}
class
and
\class
{
DictMixin
}
:
...
...
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