From: Trent Mick Date: Wed, 4 Oct 2000 17:50:59 +0000 (+0000) Subject: Fix for test_class.py on Win64. id(self), which on Win64 returns a X-Git-Tag: v2.0c1~122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d68d0a6f5a0a4af255d6a73e236166d42f8b76b6;p=python 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. --- diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py index 1fc9971731..43c1d3b518 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