On 7 Sep, 12:54, [EMAIL PROTECTED] wrote:
> I'm working on a remote object system, something kinda like Pyro.
> For the purposes of caching I need to be able to tell if a given
> dict / list / set has been modified.
> Ideally what I'd like is for them to have a modification count
> variable that increments every time the particular collection is
> modified. Unfortunately I can't find anything like that and since this
> needs to work for the regular normal list / dict / set objects
> subclassing them to add the modification count isn't useful.

What you appear to need here is some kind of proxying solution - a
layer which records accesses to the objects, distinct from the objects
themselves. I believe that the PyPy project provides something of this
nature:

http://codespeak.net/pypy/dist/pypy/doc/objspace-proxies.html

Paul
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to