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
_______________________________________________
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

Reply via email to