changes to shelf items fail silently?

Greg Ewing (using news.cis.dfn.de) me at privacy.net
Tue Mar 18 19:54:07 EST 2003


eichin at metacarta.com wrote:
> I certainly want every change to happen to the in-memory copy, which
> was what alerted me to the problem; having a sync() to flush it out to
> disk would suffice.

You could wrap something around shelve to do what you want.
The first time you retrieve a given key, it would fetch it
from the shelf, and after that just return a reference to
the previous object.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list