Message 340289 - Python tracker

Message340289

Author eric.snow
Recipients eric.snow, methane, rhettinger, serhiy.storchaka, tim.peters
Date 2019-04-15.16:07:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555344427.65.0.692882136244.issue31954@roundup.psfhosted.org>
In-reply-to
Content
Please don't miss the fact that the main reason for mirroring the dict table is to get O(1) node lookup (in the linked list).  Otherwise most lookup-dependent operations, like __delitem__(), would become O(n); whereas in the pure-Python implementation they are O(1).  This is all explained in the notes at the top of Objects/odictobject.c.

Also, I didn't change anything in the dict implementation to rely on the OrderedDict implementation.  So while I would say OrderedDict is coupled to dict, I wouldn't say the reverse, that dict is coupled to OrderedDict.  If dict changes then OrderedDict must be updated apporpropriately, but not vice-versa.  That should still hold.
History
Date User Action Args
2019-04-15 16:07:07eric.snowsetrecipients: + eric.snow, tim.peters, rhettinger, methane, serhiy.storchaka
2019-04-15 16:07:07eric.snowsetmessageid: <1555344427.65.0.692882136244.issue31954@roundup.psfhosted.org>
2019-04-15 16:07:07eric.snowlinkissue31954 messages
2019-04-15 16:07:07eric.snowcreate