mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Better method name. Tighten inner-loop with bound methods.
This commit is contained in:
parent
d5c3f6c839
commit
7babc1b6a5
2 changed files with 4 additions and 3 deletions
|
@ -173,7 +173,7 @@ class OrderedDict(dict, MutableMapping):
|
|||
def __del__(self):
|
||||
self.clear() # eliminate cyclical references
|
||||
|
||||
def _move_to_end(self, key, PREV=0, NEXT=1):
|
||||
def _renew(self, key, PREV=0, NEXT=1):
|
||||
'Fast version of self[key]=self.pop(key). Private method for internal use.'
|
||||
link = self.__map[key]
|
||||
link_prev = link[PREV]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue