diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2008-07-15 14:27:37 +0000 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2008-07-15 14:27:37 +0000 |
commit | 53663a695ef2bb96ac0252cd4cc4aa40d4f953be (patch) | |
tree | e241ef71b353f8b3162179b1eed5a3f4eaae0c5f /Lib/test/seq_tests.py | |
parent | 9ace15ca25e1e72e1b943190a5f4efbd7d118de3 (diff) | |
download | cpython-git-53663a695ef2bb96ac0252cd4cc4aa40d4f953be.tar.gz |
Issue 2235: __hash__ is once again inherited by default, but inheritance can be blocked explicitly so that collections.Hashable remains meaningful
Diffstat (limited to 'Lib/test/seq_tests.py')
-rw-r--r-- | Lib/test/seq_tests.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/seq_tests.py b/Lib/test/seq_tests.py index d9b2d2966e..c273a3fed9 100644 --- a/Lib/test/seq_tests.py +++ b/Lib/test/seq_tests.py @@ -214,8 +214,7 @@ class CommonTest(unittest.TestCase): # 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])) |