Show More
@@ -1241,7 +1241,7 b' class lrucachedict(object):' | |||
|
1241 | 1241 | head.prev = head |
|
1242 | 1242 | head.next = head |
|
1243 | 1243 | self._size = 1 |
|
1244 |
self. |
|
|
1244 | self.capacity = max | |
|
1245 | 1245 | |
|
1246 | 1246 | def __len__(self): |
|
1247 | 1247 | return len(self._cache) |
@@ -1269,7 +1269,7 b' class lrucachedict(object):' | |||
|
1269 | 1269 | self._movetohead(node) |
|
1270 | 1270 | return |
|
1271 | 1271 | |
|
1272 |
if self._size < self. |
|
|
1272 | if self._size < self.capacity: | |
|
1273 | 1273 | node = self._addcapacity() |
|
1274 | 1274 | else: |
|
1275 | 1275 | # Grab the last/oldest item. |
@@ -1312,7 +1312,7 b' class lrucachedict(object):' | |||
|
1312 | 1312 | self._cache.clear() |
|
1313 | 1313 | |
|
1314 | 1314 | def copy(self): |
|
1315 |
result = lrucachedict(self. |
|
|
1315 | result = lrucachedict(self.capacity) | |
|
1316 | 1316 | |
|
1317 | 1317 | # We copy entries by iterating in oldest-to-newest order so the copy |
|
1318 | 1318 | # has the correct ordering. |
General Comments 0
You need to be logged in to leave comments.
Login now