Hi all, The 2.5 change of id() to return positive ints-or-longs is likely to cause quite some breakage in user programs that erroneously implemented custom __hash__() functions returning a value based on an id(). This was discussed a few times already but it showed up again as a bug report (#1536021). Of course it has always been documented that id() is not directly suitable as the return value of a custom __hash__(), but so far it worked on 32-bit machines so people have been doing it all the time.
Maybe the user should just be able to return any integer value from a custom __hash__() without having to worry about not exceeding sys.maxint. After all the returned value has no real meaning. If a long is returned we could take its hash again, and use that number internally. A bientot, Armin _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com