add default parameter to pop on LRUCache

This commit is contained in:
Victor Shyba 2021-06-04 12:15:47 -03:00
parent a9f6a68952
commit 00d038c8f3

View file

@ -313,8 +313,8 @@ class LRUCache:
def clear(self):
self.cache.clear()
def pop(self, key):
return self.cache.pop(key)
def pop(self, key, default=None):
return self.cache.pop(key, default)
def __setitem__(self, key, value):
return self.set(key, value)