Package pyraf :: Module filecache :: Class FileCacheDict
[hide private]
[frames] | no frames]

Class FileCacheDict

source code


Dictionary-like set of cached values for a set of files

Initialize with class to be instantiated for each file

Instance Methods [hide private]
 
__init__(self, FileCacheClass) source code
 
add(self, filename)
Add filename to dictionary.
source code
 
abspath(self, filename) source code
 
__getitem__(self, filename) source code
 
get(self, filename, update=1)
Get value; add it if filename is not already in cache
source code
 
__delitem__(self, filename) source code
 
has_key(self, filename) source code
 
keys(self) source code
Method Details [hide private]

add(self, filename)

source code 

Add filename to dictionary. Does not overwrite existing entry.

get(self, filename, update=1)

source code 

Get value; add it if filename is not already in cache

Note that this behavior differs from the usual dictionary get() method -- effectively it never fails.