diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2008-08-11 15:45:58 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2008-08-11 15:45:58 (GMT) |
commit | 48361f5cbf419cce361fd1aa0389d6304ad167db (patch) | |
tree | e3fb92982d5564830f6ce9a3f725acc51553ec50 /Lib/ctypes/test | |
parent | f8d62d23e9b02c557b2bbe69f693fc14c2574281 (diff) | |
download | cpython-48361f5cbf419cce361fd1aa0389d6304ad167db.zip cpython-48361f5cbf419cce361fd1aa0389d6304ad167db.tar.gz cpython-48361f5cbf419cce361fd1aa0389d6304ad167db.tar.bz2 |
Issue 2235: Py3k warnings are now emitted for classes that will no longer inherit a__hash__ implementation from a parent class in Python 3.x. The standard library and test suite have been updated to not emit these warnings.
Diffstat (limited to 'Lib/ctypes/test')
-rw-r--r-- | Lib/ctypes/test/test_simplesubclasses.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/ctypes/test/test_simplesubclasses.py b/Lib/ctypes/test/test_simplesubclasses.py index 7155170..5671cce 100644 --- a/Lib/ctypes/test/test_simplesubclasses.py +++ b/Lib/ctypes/test/test_simplesubclasses.py @@ -6,6 +6,8 @@ class MyInt(c_int): if type(other) != MyInt: return -1 return cmp(self.value, other.value) + def __hash__(self): # Silence Py3k warning + return hash(self.value) class Test(unittest.TestCase): |