Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c689785

Browse files
committed
Fix-up a comment
1 parent 7f7a5a7 commit c689785

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Lib/functools.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def decorating_function(user_function):
172172
cache = {}
173173
hits = misses = 0
174174
kwd_mark = (object(),) # separate positional and keyword args
175-
cache_get = cache.get # bound method to lookup key or return None
175+
cache_get = cache.get # bound method to lookup a key or return None
176176
sentinel = object() # unique object used with cache_get
177177
_len = len # localize the global len() function
178178
lock = Lock() # because linkedlist updates aren't threadsafe
@@ -250,8 +250,7 @@ def wrapper(*args, **kwds):
250250
# empty the oldest link and make it the new root
251251
root = root[NEXT]
252252
del cache[root[KEY]]
253-
root[KEY] = None
254-
root[RESULT] = None
253+
root[KEY] = root[RESULT] = None
255254
misses += 1
256255
return result
257256

0 commit comments

Comments
 (0)