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
4614cc4f
Kaydet (Commit)
4614cc4f
authored
Eki 06, 2012
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Closes #16149: remove now-false statement about the inability to compare Decimal and float objects.
üst
b2209ccf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
expressions.rst
Doc/reference/expressions.rst
+4
-10
No files found.
Doc/reference/expressions.rst
Dosyayı görüntüle @
4614cc4f
...
@@ -1067,16 +1067,10 @@ Comparison of objects of the same type depends on the type:
...
@@ -1067,16 +1067,10 @@ Comparison of objects of the same type depends on the type:
another one is made arbitrarily but consistently within one execution of a
another one is made arbitrarily but consistently within one execution of a
program.
program.
Comparison of objects of the differing types depends on whether either
Comparison of objects of the differing types depends on whether either of the
of the types provide explicit support for the comparison. Most numeric types
types provide explicit support for the comparison. Most numeric types can be
can be compared with one another, but comparisons of :class:`float` and
compared with one another. When cross-type comparison is not supported, the
:class:`Decimal` are not supported to avoid the inevitable confusion arising
comparison method returns ``NotImplemented``.
from representation issues such as ``float('1.1')`` being inexactly represented
and therefore not exactly equal to ``Decimal('1.1')`` which is. When
cross-type comparison is not supported, the comparison method returns
``NotImplemented``. This can create the illusion of non-transitivity between
supported cross-type comparisons and unsupported comparisons. For example,
``Decimal(2) == 2`` and ``2 == float(2)`` but ``Decimal(2) != float(2)``.
.. _membership-test-details:
.. _membership-test-details:
...
...
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