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
c772372d
Kaydet (Commit)
c772372d
authored
16 years ago
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove remaining references to UserDict module.
üst
79e4803b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
21 deletions
+20
-21
shelve.rst
Doc/library/shelve.rst
+2
-2
datamodel.rst
Doc/reference/datamodel.rst
+18
-19
No files found.
Doc/library/shelve.rst
Dosyayı görüntüle @
c772372d
...
...
@@ -80,8 +80,8 @@ Restrictions
.. class:: Shelf(dict[, protocol=None[, writeback=False]])
A subclass of :class:`
UserDict.DictMixin` which stores pickled values in the
*dict* object.
A subclass of :class:`
collections.MutableMapping` which stores pickled values
in the
*dict* object.
By default, version 0 pickles are used to serialize values. The version of the
pickle protocol can be specified with the *protocol* parameter. See the
...
...
This diff is collapsed.
Click to expand it.
Doc/reference/datamodel.rst
Dosyayı görüntüle @
c772372d
...
...
@@ -1554,26 +1554,25 @@ either to emulate a sequence or to emulate a mapping; the difference is that for
a sequence, the allowable keys should be the integers *k* for which ``0 <= k <
N`` where *N* is the length of the sequence, or slice objects, which define a
range of items. It is also recommended that mappings provide the methods
:meth:`keys`, :meth:`values`, :meth:`items`, :meth:`get`,
:meth:`clear`, :meth:`setdefault`,
:meth:`pop`, :meth:`popitem`, :meth:`copy`, and
:meth:`keys`, :meth:`values`, :meth:`items`, :meth:`get`, :meth:`clear`,
:meth:`setdefault`, :meth:`pop`, :meth:`popitem`, :meth:`copy`, and
:meth:`update` behaving similar to those for Python's standard dictionary
objects. The :mod:`
UserDict` module provides a :class:`DictMixin` class to help
create those methods from a base set of :meth:`__getitem__`,
:meth:`__
setitem__`, :meth:`__delitem__`, and :meth:`keys`. Mutable sequences
should provide methods :meth:`append`, :meth:`count`, :meth:`index
`,
:meth:`
extend`, :meth:`insert`, :meth:`pop`, :meth:`remove`, :meth:`reverse` and
:meth:`
sort`, like Python standard list objects. Finally, sequence types should
implement addition (meaning concatenation) and multiplication (meaning
repetition) by defining the methods :meth:`__add__`, :meth:`__r
add__`,
:meth:`__
iadd__`, :meth:`__mul__`, :meth:`__rmul__` and :meth:`__imul__`
described below; they should not define other numerical operators. It is
recommended that both mappings and sequences implement the :meth:`__contains__`
method to allow efficient use of the ``in`` operator; for mappings, ``in``
should search the mapping's keys; for sequences, it should search
through the values. It is further recommended that both mappings and sequences
implement the :meth:`__iter__` method to allow efficient iteration through the
container; for mappings, :meth:`__iter__` should be the same as
objects. The :mod:`
collections` module provides a :class:`MutableMapping`
abstract base class to help create those methods from a base set of
:meth:`__
getitem__`, :meth:`__setitem__`, :meth:`__delitem__`, and :meth:`keys`.
Mutable sequences should provide methods :meth:`append`, :meth:`count
`,
:meth:`
index`, :meth:`extend`, :meth:`insert`, :meth:`pop`, :meth:`remove`,
:meth:`
reverse` and :meth:`sort`, like Python standard list objects. Finally,
sequence types should implement addition (meaning concatenation) and
multiplication (meaning repetition) by defining the methods :meth:`__
add__`,
:meth:`__
radd__`, :meth:`__iadd__`, :meth:`__mul__`, :meth:`__rmul__` and
:meth:`__imul__` described below; they should not define other numerical
operators. It is recommended that both mappings and sequences implement the
:meth:`__contains__` method to allow efficient use of the ``in`` operator; for
mappings, ``in`` should search the mapping's keys; for sequences, it should
search through the values. It is further recommended that both mappings and
sequences implement the :meth:`__iter__` method to allow efficient iteration
through the
container; for mappings, :meth:`__iter__` should be the same as
:meth:`keys`; for sequences, it should iterate through the values.
.. method:: object.__len__(self)
...
...
This diff is collapsed.
Click to expand it.
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