[Python-checkins] CVS: python/dist/src/Lib dircache.py,1.8,1.9

Guido van Rossum gvanrossum@users.sourceforge.net
2001年3月02日 05:35:39 -0800


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv20570
Modified Files:
	dircache.py 
Log Message:
Patch by Itamar S.T. (SF#305470): add reset() method.
Index: dircache.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/dircache.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** dircache.py	2001年01月20日 19:54:20	1.8
--- dircache.py	2001年03月02日 13:35:37	1.9
***************
*** 7,13 ****
 import os
 
! __all__ = ["listdir","opendir","annotate"]
 
 cache = {}
 
 def listdir(path):
--- 7,18 ----
 import os
 
! __all__ = ["listdir", "opendir", "annotate", "reset"]
 
 cache = {}
+ 
+ def reset():
+ """Reset the cache completely."""
+ global cache
+ cache = {}
 
 def listdir(path):

AltStyle によって変換されたページ (->オリジナル) /