Skip to content

Commit

Permalink
Merge branch 'main' into sqrtprod_fullrange
Browse files Browse the repository at this point in the history
  • Loading branch information
rhettinger authored Aug 11, 2023
2 parents ec221b7 + 23a6db9 commit 010b3ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Doc/library/collections.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ variants of :func:`functools.lru_cache`:
result = self.func(*args)
self.cache[args] = time(), result
if len(self.cache) > self.maxsize:
self.cache.popitem(0)
self.cache.popitem(last=False)
return result

Expand Down Expand Up @@ -1256,12 +1256,12 @@ variants of :func:`functools.lru_cache`:
if self.requests[args] <= self.cache_after:
self.requests.move_to_end(args)
if len(self.requests) > self.maxrequests:
self.requests.popitem(0)
self.requests.popitem(last=False)
else:
self.requests.pop(args, None)
self.cache[args] = result
if len(self.cache) > self.maxsize:
self.cache.popitem(0)
self.cache.popitem(last=False)
return result
.. doctest::
Expand Down

0 comments on commit 010b3ee

Please sign in to comment.