Issue #23641: Cleaned out legacy dunder names from tests and docs.

Fixed 2 to 3 porting bug in pynche.ColorDB.
Added few tests for __truediv__, __floordiv__ and __matmul__.
This commit is contained in:
Serhiy Storchaka 2015-03-12 22:01:30 +02:00
commit c2ccce791c
19 changed files with 86 additions and 124 deletions

View file

@ -960,13 +960,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)