summaryrefslogtreecommitdiffstats
path: root/Doc/reference
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-10-06 11:48:39 (GMT)
committerGeorg Brandl <georg@python.org>2012-10-06 11:48:39 (GMT)
commit4614cc4f7fcdc4537ea98fc49308719b71093972 (patch)
treebaa2f38429821c4a430a234cdf9b8e1a72411301 /Doc/reference
parentb2209ccfa0adcb388dc9f25f2d3fa22b6b42f12c (diff)
downloadcpython-4614cc4f7fcdc4537ea98fc49308719b71093972.zip
cpython-4614cc4f7fcdc4537ea98fc49308719b71093972.tar.gz
cpython-4614cc4f7fcdc4537ea98fc49308719b71093972.tar.bz2
Closes #16149: remove now-false statement about the inability to compare Decimal and float objects.
Diffstat (limited to 'Doc/reference')
-rw-r--r--Doc/reference/expressions.rst14
1 files changed, 4 insertions, 10 deletions
diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index 72ad95e..e359237 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -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
program.
-Comparison of objects of the differing types depends on whether either
-of the types provide explicit support for the comparison. Most numeric types
-can be compared with one another, but comparisons of :class:`float` and
-:class:`Decimal` are not supported to avoid the inevitable confusion arising
-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)``.
+Comparison of objects of the differing types depends on whether either of the
+types provide explicit support for the comparison. Most numeric types can be
+compared with one another. When cross-type comparison is not supported, the
+comparison method returns ``NotImplemented``.
.. _membership-test-details: