From d68d0a6f5a0a4af255d6a73e236166d42f8b76b6 Mon Sep 17 00:00:00 2001 From: Trent Mick Date: Wed, 4 Oct 2000 17:50:59 +0000 Subject: 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. --- Lib/test/test_class.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py index 1fc9971..43c1d3b 100644 --- a/Lib/test/test_class.py +++ b/Lib/test/test_class.py @@ -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 -- cgit v0.12