mirror of
https://gitlab.com/ita1024/waf.git
synced 2025-01-25 18:00:03 +01:00
Remove popitem() which was added for the lru cache
This commit is contained in:
parent
9133dbc5c9
commit
304935bb9f
@ -114,14 +114,6 @@ class ordered_iter_dict(dict):
|
||||
return reversed(self.lst)
|
||||
def keys(self):
|
||||
return reversed(self.lst)
|
||||
def popitem(self, last=True):
|
||||
if last:
|
||||
key = self.lst.popright()
|
||||
else:
|
||||
key = self.lst.popleft()
|
||||
ret = (key, dict.__getitem__(self, key))
|
||||
dict.__delitem__(self, key)
|
||||
return ret
|
||||
|
||||
class lru_node(object):
|
||||
__slots__ = ('next', 'prev', 'key', 'val')
|
||||
|
Loading…
x
Reference in New Issue
Block a user