mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Issue #23641: Cleaned out legacy dunder names from tests and docs.
Fixed 2 to 3 porting bug in pynche.ColorDB.
This commit is contained in:
parent
18987a11ce
commit
a60c2fe480
19 changed files with 72 additions and 124 deletions
|
@ -967,13 +967,12 @@ class Decimal(object):
|
|||
return self._cmp(other) >= 0
|
||||
|
||||
def compare(self, other, context=None):
|
||||
"""Compares one to another.
|
||||
"""Compare self to other. Return a decimal value:
|
||||
|
||||
-1 => a < b
|
||||
0 => a = b
|
||||
1 => a > b
|
||||
NaN => one is NaN
|
||||
Like __cmp__, but returns Decimal instances.
|
||||
a or b is a NaN ==> Decimal('NaN')
|
||||
a < b ==> Decimal('-1')
|
||||
a == b ==> Decimal('0')
|
||||
a > b ==> Decimal('1')
|
||||
"""
|
||||
other = _convert_other(other, raiseit=True)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue