summaryrefslogtreecommitdiff
path: root/Lib/sqlite3
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-03-12 21:56:08 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-03-12 21:56:08 +0200
commita60c2fe4807e89a5844979fe46b3ea39572fc3be (patch)
tree0177eec0d55bb6325897ed7a19db9dad2e5df304 /Lib/sqlite3
parent18987a11ce0f8f55aa6ec63a9d2f8e84d7460984 (diff)
downloadcpython-git-a60c2fe4807e89a5844979fe46b3ea39572fc3be.tar.gz
Issue #23641: Cleaned out legacy dunder names from tests and docs.
Fixed 2 to 3 porting bug in pynche.ColorDB.
Diffstat (limited to 'Lib/sqlite3')
-rw-r--r--Lib/sqlite3/test/types.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/Lib/sqlite3/test/types.py b/Lib/sqlite3/test/types.py
index a8fdad9ee1..adad571b9a 100644
--- a/Lib/sqlite3/test/types.py
+++ b/Lib/sqlite3/test/types.py
@@ -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: