[Chris Spencer]
> Instead of requiring all persistable objects to inherit a special class,
> wouldn't it be possible to dynamically wrap a class's __setattr__ and/or
> __setitem__ methods to determine when an object's been modified?
I'm not clear on what you're trying to accomplish, but any persis
Chris Spencer wrote:
I understand this has some drawbacks. Namely, it will only work for
new-style classes, but for a large code base this might be easier than
manually writing _p_changed = 1 everywhere.
The number of times you end up actually having to write this is pretty
minimal ;-)
Chri
Instead of requiring all persistable objects to inherit a special class,
wouldn't it be possible to dynamically wrap a class's __setattr__ and/or
__setitem__ methods to determine when an object's been modified?
Something like:
class Monitor(object):
class Proxy(object):
def __init