Commits

Anonymous committed 008abf6

Hold key reference until the links have updated.

Comments (0)

Files changed (1)

Lib/collections.py

         # 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]