Message244727
How well does OrderedDict need to behave in the face of keys with unstable hashes (e.g. define __hash__ with varying results across calls)? I would expect the behavior to be undefined (though non-crashing). Here's an example of a misbehaving key:
class Key:
def __hash__(self):
return randrange(10000)
FWIW, dict does pretty well even with bad keys. The pure Python OrderedDict does okay. |
|
Date |
User |
Action |
Args |
2015-06-03 03:01:20 | eric.snow | set | recipients:
+ eric.snow, rhettinger |
2015-06-03 03:01:20 | eric.snow | set | messageid: <1433300480.06.0.538096094872.issue24370@psf.upfronthosting.co.za> |
2015-06-03 03:01:19 | eric.snow | link | issue24370 messages |
2015-06-03 03:01:19 | eric.snow | create | |
|