diff options
author | Raymond Hettinger <python@rcn.com> | 2013-03-23 12:27:51 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-03-23 12:27:51 (GMT) |
commit | 5ded795a72d6de03066ee5975c85501612d11d8f (patch) | |
tree | eb9b8bcfab05578e2b5ae7308168f0d79cf149ba /Lib | |
parent | bb2dad8915a864503e3f81657f41500f0a49d987 (diff) | |
download | cpython-5ded795a72d6de03066ee5975c85501612d11d8f.zip cpython-5ded795a72d6de03066ee5975c85501612d11d8f.tar.gz cpython-5ded795a72d6de03066ee5975c85501612d11d8f.tar.bz2 |
Hold key reference until the links have updated.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/collections.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/collections.py b/Lib/collections.py index a092241..faf677b 100644 --- a/Lib/collections.py +++ b/Lib/collections.py @@ -66,7 +66,7 @@ class OrderedDict(dict): # Deleting an existing item uses self.__map to find the link which gets # removed by updating the links in the predecessor and successor nodes. dict_delitem(self, key) - link_prev, link_next, key = self.__map.pop(key) + link_prev, link_next, _ = self.__map.pop(key) link_prev[1] = link_next # update link_prev[NEXT] link_next[0] = link_prev # update link_next[PREV] |