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:
Serhiy Storchaka 2015-03-12 21:56:08 +02:00
parent 18987a11ce
commit a60c2fe480
19 changed files with 72 additions and 124 deletions

View file

@ -88,19 +88,10 @@ class DeclTypesTests(unittest.TestCase):
_val = _val.decode('utf-8')
self.val = _val
def __cmp__(self, other):
if not isinstance(other, DeclTypesTests.Foo):
raise ValueError
if self.val == other.val:
return 0
else:
return 1
def __eq__(self, other):
c = self.__cmp__(other)
if c is NotImplemented:
return c
return c == 0
if not isinstance(other, DeclTypesTests.Foo):
return NotImplemented
return self.val == other.val
def __conform__(self, protocol):
if protocol is sqlite.PrepareProtocol: