From 4f5139ba20a76c0bc9b3dd361cdde27b5abff6a4 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Fri, 16 Mar 2012 17:08:37 -0700 Subject: [PATCH] Root variable is not changed. --- Lib/functools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/functools.py b/Lib/functools.py index 19b7613918..fec4b9e703 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -223,7 +223,7 @@ def lru_cache(maxsize=100, typed=False): def cache_clear(): """Clear the cache and cache statistics""" - nonlocal hits, misses, root + nonlocal hits, misses with lock: cache.clear() root[:] = [root, root, None, None] -- 2.50.1