diff options
author | Sjoerd Mullender <sjoerd@acm.org> | 1995-12-07 10:16:45 (GMT) |
---|---|---|
committer | Sjoerd Mullender <sjoerd@acm.org> | 1995-12-07 10:16:45 (GMT) |
commit | e5fe4af070bb5251304f30f1381f521de3c655bf (patch) | |
tree | 88f079cef2fade9322505518d1b4ec647a220227 /Lib | |
parent | 453ced57dc55e4a04b8b0039f3899b99e8cdaa43 (diff) | |
download | cpython-e5fe4af070bb5251304f30f1381f521de3c655bf.zip cpython-e5fe4af070bb5251304f30f1381f521de3c655bf.tar.gz cpython-e5fe4af070bb5251304f30f1381f521de3c655bf.tar.bz2 |
Use global statement instead of importing ourselves to get to global
variable.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/statcache.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/statcache.py b/Lib/statcache.py index 04381f3..770aef0 100644 --- a/Lib/statcache.py +++ b/Lib/statcache.py @@ -22,14 +22,10 @@ def stat(path): # 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. |