From: Sjoerd Mullender Date: Thu, 7 Dec 1995 10:16:45 +0000 (+0000) Subject: Use global statement instead of importing ourselves to get to global X-Git-Tag: v1.4b1~456 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e5fe4af070bb5251304f30f1381f521de3c655bf;p=thirdparty%2FPython%2Fcpython.git Use global statement instead of importing ourselves to get to global variable. --- diff --git a/Lib/statcache.py b/Lib/statcache.py index 04381f386159..770aef0662f4 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.