hash defaulting to id and id (was: [Python-Dev] sizeof(long)
pedronis at bluewin.ch
Tue Aug 5 23:06:27 EDT 2003
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 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.
More information about the Python-Dev