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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4