diff Lib/test/seq_tests.py @ 48475:f4e7ef4329a9

Manual forward port of 64962 - use PyObject_HashNotImplemented as a tp_hash level indicator that the default hash implementation has not been inherited
author Nick Coghlan <ncoghlan@gmail.com>
date Tue, 15 Jul 2008 15:46:38 +0000
parents 740b5808c57a
children afb9808b0f30
line wrap: on
line diff
--- a/Lib/test/seq_tests.py	Tue Jul 15 15:32:09 2008 +0000
+++ b/Lib/test/seq_tests.py	Tue Jul 15 15:46:38 2008 +0000
@@ -212,8 +212,7 @@
             # So instances of AllEq must be found in all non-empty sequences.
             def __eq__(self, other):
                 return True
-            def __hash__(self):
-                raise NotImplemented
+            __hash__ = None # Can't meet hash invariant requirements
         self.assert_(AllEq() not in self.type2test([]))
         self.assert_(AllEq() in self.type2test([1]))