mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Patch by Itamar S.T. (SF#305470): add reset() method.
This commit is contained in:
parent
53a79060bb
commit
d1d053cc3f
1 changed files with 6 additions and 1 deletions
|
@ -6,10 +6,15 @@ The annotate() routine appends slashes to directories."""
|
|||
|
||||
import os
|
||||
|
||||
__all__ = ["listdir","opendir","annotate"]
|
||||
__all__ = ["listdir", "opendir", "annotate", "reset"]
|
||||
|
||||
cache = {}
|
||||
|
||||
def reset():
|
||||
"""Reset the cache completely."""
|
||||
global cache
|
||||
cache = {}
|
||||
|
||||
def listdir(path):
|
||||
"""List directory contents, using cache."""
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue