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 Dennis Sweeney
Recipients Dennis Sweeney, danielfleischman, methane, rhettinger, serhiy.storchaka
Date 2021-07-03.17:03:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1625331798.62.0.478993460744.issue44555@roundup.psfhosted.org>
In-reply-to
Content
OrderedDict already uses a linked list alongside a dictionary and meets all of your timing expectations, but has a higher memory usage, as linked lists generally do.

Since so many Python objects use dictionaries under the hood, it would probably not be worth it to completely change the dict structure and the memory usage of Python as a whole to only benefit this uncommon case. See Objects/dictnotes.txt for the highest priority use cases of dicts.

Per the OrderedDict docs, ordering is only secondary for dicts, but it's the focus for OrderedDicts. Just like you wouldn't send a list to do the job of a deque or vice versa, I don't think you should send an dict to do the job of an OrderedDict or vice versa.
History
Date User Action Args
2021-07-03 17:03:18Dennis Sweeneysetrecipients: + Dennis Sweeney, rhettinger, methane, serhiy.storchaka, danielfleischman
2021-07-03 17:03:18Dennis Sweeneysetmessageid: <1625331798.62.0.478993460744.issue44555@roundup.psfhosted.org>
2021-07-03 17:03:18Dennis Sweeneylinkissue44555 messages
2021-07-03 17:03:18Dennis Sweeneycreate