File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1094,16 +1094,10 @@ Comparison of objects of the same type depends on the type:
10941094 another one is made arbitrarily but consistently within one execution of a
10951095 program.
10961096
1097- Comparison of objects of the differing types depends on whether either
1098- of the types provide explicit support for the comparison. Most numeric types
1099- can be compared with one another, but comparisons of :class: `float ` and
1100- :class: `Decimal ` are not supported to avoid the inevitable confusion arising
1101- from representation issues such as ``float('1.1') `` being inexactly represented
1102- and therefore not exactly equal to ``Decimal('1.1') `` which is. When
1103- cross-type comparison is not supported, the comparison method returns
1104- ``NotImplemented ``. This can create the illusion of non-transitivity between
1105- supported cross-type comparisons and unsupported comparisons. For example,
1106- ``Decimal(2) == 2 `` and ``2 == float(2) `` but ``Decimal(2) != float(2) ``.
1097+ Comparison of objects of the differing types depends on whether either of the
1098+ types provide explicit support for the comparison. Most numeric types can be
1099+ compared with one another. When cross-type comparison is not supported, the
1100+ comparison method returns ``NotImplemented ``.
11071101
11081102.. _membership-test-details :
11091103
You can’t perform that action at this time.
0 commit comments