mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Remove references to __cmp__.
This commit is contained in:
parent
23dbc6eeca
commit
05f5ab7ee3
5 changed files with 42 additions and 66 deletions
|
@ -375,15 +375,14 @@ Decimal objects
|
|||
|
||||
.. method:: compare(other[, context])
|
||||
|
||||
Compare the values of two Decimal instances. This operation behaves in
|
||||
the same way as the usual comparison method :meth:`__cmp__`, except that
|
||||
:meth:`compare` returns a Decimal instance rather than an integer, and if
|
||||
either operand is a NaN then the result is a NaN::
|
||||
Compare the values of two Decimal instances. :meth:`compare` returns a
|
||||
Decimal instance, and if either operand is a NaN then the result is a
|
||||
NaN::
|
||||
|
||||
a or b is a NaN ==> Decimal('NaN')
|
||||
a < b ==> Decimal('-1')
|
||||
a == b ==> Decimal('0')
|
||||
a > b ==> Decimal('1')
|
||||
a or b is a NaN ==> Decimal('NaN')
|
||||
a < b ==> Decimal('-1')
|
||||
a == b ==> Decimal('0')
|
||||
a > b ==> Decimal('1')
|
||||
|
||||
.. method:: compare_signal(other[, context])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue