This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eric.snow
Recipients eric.snow, rhettinger
Date 2015-06-03.03:01:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1433300480.06.0.538096094872.issue24370@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-06-03 03:01:20eric.snowsetrecipients: + eric.snow, rhettinger
2015-06-03 03:01:20eric.snowsetmessageid: <1433300480.06.0.538096094872.issue24370@psf.upfronthosting.co.za>
2015-06-03 03:01:19eric.snowlinkissue24370 messages
2015-06-03 03:01:19eric.snowcreate