From: Raymond Hettinger Date: Sat, 17 Mar 2012 00:08:37 +0000 (-0700) Subject: Root variable is not changed. X-Git-Tag: v3.3.0a2~136 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4f5139ba20a76c0bc9b3dd361cdde27b5abff6a4;p=thirdparty%2FPython%2Fcpython.git Root variable is not changed. --- diff --git a/Lib/functools.py b/Lib/functools.py index 19b761391812..fec4b9e7036a 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]