mirror of
https://github.com/python/cpython.git
synced 2025-09-28 11:15:17 +00:00
Merge heads
This commit is contained in:
commit
b4f998a57f
1 changed files with 2 additions and 2 deletions
|
@ -266,7 +266,7 @@ def lru_cache(maxsize=128, typed=False):
|
||||||
elif maxsize is None:
|
elif maxsize is None:
|
||||||
|
|
||||||
def wrapper(*args, **kwds):
|
def wrapper(*args, **kwds):
|
||||||
# simple caching without ordering or size limit
|
# Simple caching without ordering or size limit
|
||||||
nonlocal hits, misses
|
nonlocal hits, misses
|
||||||
key = make_key(args, kwds, typed)
|
key = make_key(args, kwds, typed)
|
||||||
result = cache_get(key, sentinel)
|
result = cache_get(key, sentinel)
|
||||||
|
@ -281,7 +281,7 @@ def lru_cache(maxsize=128, typed=False):
|
||||||
else:
|
else:
|
||||||
|
|
||||||
def wrapper(*args, **kwds):
|
def wrapper(*args, **kwds):
|
||||||
# size limited caching that tracks accesses by recency
|
# Size limited caching that tracks accesses by recency
|
||||||
nonlocal root, hits, misses, full
|
nonlocal root, hits, misses, full
|
||||||
key = make_key(args, kwds, typed)
|
key = make_key(args, kwds, typed)
|
||||||
with lock:
|
with lock:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue