[issue2603] Make range __eq__ work

Raymond Hettinger report at bugs.python.org
Thu Apr 17 08:43:39 CEST 2008


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

No need to get hung-up on the hash function.  I can fix that up after a 
checkin and use something simple like: hashvalue = (start*prime1+seqlen)
*prime2+step.  That doesn't involve object creation and it produces the 
same hash value for range(5,10,2) and range(5,9,2) which are equivalent.

----------
nosy: +rhettinger

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2603>
__________________________________


More information about the Python-bugs-list mailing list