Message267840
There's nothing wrong with two different Decimal objects having the same hash (indeed, it's inevitable, given that there are fewer than 2**64 hash values available, and many more possible Decimal objects). It only becomes a problem if you have a largish naturally-occurring dataset whose values all end up falling into the same hash bucket, resulting in linear-time dict operations instead of constant time.
I don't think that's the case here: each example of this form only has two different values with the same hash.
@Radosław Szalski: is this causing problems in a real application? If not, I think it should be closed as "won't fix".
Note that Python 3 is not subject to this issue: it uses a different hashing technique (as described in the issue 8188 that you already linked to). |
|
Date |
User |
Action |
Args |
2016-06-08 12:00:01 | mark.dickinson | set | recipients:
+ mark.dickinson, Radosław Szalski |
2016-06-08 12:00:01 | mark.dickinson | set | messageid: <1465387201.19.0.421153776662.issue27265@psf.upfronthosting.co.za> |
2016-06-08 12:00:01 | mark.dickinson | link | issue27265 messages |
2016-06-08 12:00:00 | mark.dickinson | create | |
|