[Python-checkins] CVS: python/dist/src/Lib/test test_class.py,1.1,1.2
Trent Mick
python-dev@python.org
Wed, 4 Oct 2000 10:51:03 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory slayer.i.sourceforge.net:/tmp/cvs-serv17006/Lib/test
Modified Files:
test_class.py
Log Message:
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.
Index: test_class.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_class.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** test_class.py 2000/08/17 22:37:32 1.1
--- test_class.py 2000/10/04 17:50:59 1.2
***************
*** 72,76 ****
def __hash__(self, *args):
print "__hash__:", args
! return id(self)
def __str__(self, *args):
--- 72,76 ----
def __hash__(self, *args):
print "__hash__:", args
! return hash(id(self))
def __str__(self, *args):