Author chemacortes
Recipients chemacortes, jcea
Date 2009-02-06.14:16:26
SpamBayes Score 0.00270765
Marked as misclassified No
Message-id <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za>
In-reply-to
Content
Sometimes, the default hash for user-defined object is not equal to the
id of the object:

In [1]: class A:
  ...:   pass

In [2]: a=A()

In [3]: id(a),hash(a)
Out[3]: (3082955212L, -1212012084)

The test box has an AMD Sempron, a 64bit CPU archictecture emulating a
32bit one. This following relation can be deduced:

hash(a)=id(a)-2**32
History
Date User Action Args
2009-02-06 14:16:28chemacortessetrecipients: + chemacortes, jcea
2009-02-06 14:16:28chemacortessetmessageid: <1233929788.34.0.870033033845.issue5169@psf.upfronthosting.co.za>
2009-02-06 14:16:26chemacorteslinkissue5169 messages
2009-02-06 14:16:26chemacortescreate