2
0
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:
Thomas Nagy 2016-04-23 23:02:16 +02:00
parent 9133dbc5c9
commit 304935bb9f
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64

View File

@ -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')