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

Skip to content

Commit 57b2959

Browse files
committed
Eliminate duplicate link lookup. Minor cleanup.
1 parent eb74918 commit 57b2959

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/functools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,11 @@ def wrapper(*args, **kwds):
191191
key += tuple(map(type, args))
192192
if kwds:
193193
key += tuple(type(v) for k, v in sorted_items)
194-
PREV, NEXT = 0, 1 # names of link fields
194+
PREV = 0 # names of link fields
195+
NEXT = 1
195196
with lock:
196197
link = cache_get(key)
197198
if link is not None:
198-
link = cache[key]
199199
# record recent use of the key by moving it to the front of the list
200200
link_prev, link_next, key, result = link
201201
link_prev[NEXT] = link_next

0 commit comments

Comments
 (0)