[New-bugs-announce] [issue5169] Default hash not equal to id on AMD Sempron

Chema Cortés report at bugs.python.org
Fri Feb 6 15:16:28 CET 2009


New submission from Chema Cortés <dev.xtrem at gmail.com>:

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

----------
components: Interpreter Core
messages: 81269
nosy: chemacortes, jcea
severity: normal
status: open
title: Default hash not equal to id on AMD Sempron
type: behavior
versions: Python 2.5

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5169>
_______________________________________


More information about the New-bugs-announce mailing list