Author mark.dickinson
Recipients Rhamphoryncus, eric.smith, mark.dickinson
Date 2010-03-23.14:01:24
SpamBayes Score 2.30216e-10
Marked as misclassified No
Message-id <1269352894.63.0.0508863940352.issue8188@psf.upfronthosting.co.za>
In-reply-to
Content
Another update, partly to address comments raised by Guido on Rietveld.  I'll upload these changes to Rietveld later today.

 - rename sys._hash_info to sys.hash_info and make it public rather than private (it still needs docs somewhere)

 - add some explanatory comments to long_hash; remove an outdated comment

 - fix missing error check (in previous patch) in slot_tp_hash.  slot_tp_hash also now always raises a TypeError if __hash__ returns a non-integer;  this is a change from current behaviour, which allows small floats to be returned by __hash__, but not large floats (where large means > 2**31 or > 2**63 in absolute value, depending on the system).  I'm assuming this was unintentional (the docs specify that __hash__ should return an integer).

 - simplify specification of hash function slightly:  for nonnegative x it simply computes the reduction of x;  previously it computed 1 + reduction of (x-1) for positive values.  This extra +-1 doesn't really add anything of value, and makes it slightly more complicated and error-prone to write your own hash function.
History
Date User Action Args
2010-03-23 14:01:35mark.dickinsonsetrecipients: + mark.dickinson, Rhamphoryncus, eric.smith
2010-03-23 14:01:34mark.dickinsonsetmessageid: <1269352894.63.0.0508863940352.issue8188@psf.upfronthosting.co.za>
2010-03-23 14:01:33mark.dickinsonlinkissue8188 messages
2010-03-23 14:01:31mark.dickinsoncreate