Root variable is not changed.

This commit is contained in:
Raymond Hettinger 2012-03-16 17:08:37 -07:00
parent 202d1ad3f6
commit 4f5139ba20

View File

@ -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]