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
2a09b6e8
Kaydet (Commit)
2a09b6e8
authored
Eki 06, 2012
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge with 3.3.
üst
3dc23d4b
2fdc0f8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
collections.rst
Doc/library/collections.rst
+10
-10
No files found.
Doc/library/collections.rst
Dosyayı görüntüle @
2a09b6e8
...
...
@@ -347,24 +347,24 @@ or subtracting from an empty counter.
this section documents the minimum range and type restrictions.
* The :class:`Counter` class itself is a dictionary subclass with no
restrictions on its keys and values. The values are intended to be numbers
representing counts, but you *could* store anything in the value field.
restrictions on its keys and values. The values are intended to be numbers
representing counts, but you *could* store anything in the value field.
* The :meth:`most_common` method requires only that the values be orderable.
* For in-place operations such as ``c[key] += 1``, the value type need only
support addition and subtraction. So fractions, floats, and decimals would
work and negative values are supported. The same is also true for
:meth:`update` and :meth:`subtract` which allow negative and zero values
for both inputs and outputs.
support addition and subtraction. So fractions, floats, and decimals would
work and negative values are supported. The same is also true for
:meth:`update` and :meth:`subtract` which allow negative and zero values
for both inputs and outputs.
* The multiset methods are designed only for use cases with positive values.
The inputs may be negative or zero, but only outputs with positive values
are created. There are no type restrictions, but the value type needs to
support addition, subtraction, and comparison.
The inputs may be negative or zero, but only outputs with positive values
are created. There are no type restrictions, but the value type needs to
support addition, subtraction, and comparison.
* The :meth:`elements` method requires integer counts. It ignores zero and
negative counts.
negative counts.
.. seealso::
...
...
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