A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-August/068057.html below:

[Python-Dev] returning longs from __hash__()

[Python-Dev] returning longs from __hash__() [Python-Dev] returning longs from __hash__()"Martin v. Löwis" martin at v.loewis.de
Tue Aug 8 21:08:56 CEST 2006
Armin Rigo schrieb:
> 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.

Nick Coghlan already suggested that, when __hash__ returns a long int,
the tp_hash of long int should be used to compute the true hash value.

Could you see any problems with that approach? If not, and if I don't
hear other objections, I'd like to go ahead and fix it that way.

Regards,
Martin
More information about the Python-Dev mailing list

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