Python bugs

Mike Fletcher mcfletch at vrtelecom.com
Tue Nov 30 05:56:10 EST 1999


I have build structures that are very much like that discussed.  For some
classes of application they are quite useful.  Adding an object to the
ObjectStore merely marks it as "to be stored" when the ObjectStore is
committed  and adds it to the identity cache (though a write-through flag
can override that, causing immediate committing of that item).  When the
ObjectStore is committed or destroyed it writes the current values of all
active (cached) objects to disk.  When an attempt is made to access a
variable, it is either read from the identity cache or loaded directly.

Although not as elegant as some caching schemes, it's not a truly abysmal
solution :) .  Unfortunately, that code is not mine to release, so I can't
demonstrate the value :-/ .

Enjoy,
Mike

-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of Adrian Eyre
Sent: November 30, 1999 4:32 AM
To: Skip Montanaro
Cc: python-list at python.org
Subject: RE: Python bugs


>     >>> s = shelve.open("foo")
>     >>> l = []
>     >>> s["bar"] = l
>     >>> s["bar"]
>     []
>     >>> l.append("baz")
>     >>> s["bar"]
>     []
>
> I think you're asking for magic that really can't happen (at least not
> easily).
...





More information about the Python-list mailing list