mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue