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

Skip to content

Commit 29a837d

Browse files
committed
merge heads
2 parents 954cf57 + d656958 commit 29a837d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

Lib/functools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ def decorating_function(user_function,
156156
lock = Lock() # needed because linkedlist isn't threadsafe
157157
root = [] # root of circular doubly linked list
158158
root[:] = [root, root, None, None] # initialize by pointing to self
159+
PREV, NEXT, KEY, RESULT = 0, 1, 2, 3 # names of link fields
159160

160161
if maxsize is None:
161162
@wraps(user_function)
@@ -191,8 +192,6 @@ def wrapper(*args, **kwds):
191192
key += tuple(map(type, args))
192193
if kwds:
193194
key += tuple(type(v) for k, v in sorted_items)
194-
PREV = 0 # names of link fields
195-
NEXT = 1
196195
with lock:
197196
link = cache_get(key)
198197
if link is not None:

0 commit comments

Comments
 (0)