mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
Fix for test_class.py on Win64. id(self), which on Win64 returns a
PyLong, was used for the return value of a class __hash__ method, which *must* return a PyInt. Solution: hash() the id(self) value.
This commit is contained in:
parent
b2c2c9e977
commit
d68d0a6f5a
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ class AllTests:
|
|||
|
||||
def __hash__(self, *args):
|
||||
print "__hash__:", args
|
||||
return id(self)
|
||||
return hash(id(self))
|
||||
|
||||
def __str__(self, *args):
|
||||
print "__str__:", args
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue