hash defaulting to id and id (was: [Python-Dev]
sizeof(long) != sizeof(void*))
Samuele Pedroni
pedronis at bluewin.ch
Tue Aug 5 23:16:52 EDT 2003
At 22:06 05.08.2003 +0200, Samuele Pedroni wrote:
>At 21:38 05.08.2003 +0200, Martin v. Löwis wrote:
>>On Win64, a number of tests fail as they expect that a Python integer
>>can represent a platform pointer. For example, test_array expects that
>>buffer_info returns an integer. Likewise, test_descr expects that id()
>>and hash() return the same value by default.
>
>hash() returning the same value as id() as fallback default
i.e.
object.__hash__(x) == id(x)
>is not a reasonable assumption. I'm about to fix the long standing broken
>id in Jython and keeping the default hash() equal to id() is a too
>expensive option.
>
>I even think that in the long run id() should be depracated in favor of
>offering identity mappings and weak identity mappings. id() is not
>reasonably implementable across the range of GC implementations.
>
>regards.
>
>
>
>
>
>
>_______________________________________________
>Python-Dev mailing list
>Python-Dev at python.org
>http://mail.python.org/mailman/listinfo/python-dev
More information about the Python-Dev
mailing list