Mercurial > cpython-lru_cache-weakref
diff Lib/statcache.py @ 3286:6d4f71430722 legacy-trunk
Use global statement instead of importing ourselves to get to global
variable.
| author | Sjoerd Mullender <sjoerd@acm.org> |
|---|---|
| date | Thu, 07 Dec 1995 10:16:45 +0000 |
| parents | 7259e96a04a9 |
| children | 6f4146846337 |
line wrap: on
line diff
--- a/Lib/statcache.py Thu Nov 30 17:42:08 1995 +0000 +++ b/Lib/statcache.py Thu Dec 07 10:16:45 1995 +0000 @@ -22,14 +22,10 @@ # Reset the cache completely. -# Hack: to reset a global variable, we import this module. # def reset(): - import statcache - # Check that we really imported the same module - if cache is not statcache.cache: - raise 'sorry, statcache identity crisis' - statcache.cache = {} + global cache + cache = {} # Remove a given item from the cache, if it exists.
