File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments