On Thu, 4 Dec 2003 22:43:27 +0100 Dieter Maurer <dieter@handshake.de> wrote:
Casey Duncan wrote at 2003-12-4 14:08 -0500: [snip]
I do not think, it will work.
As a side effect how acquisition works, the registering objects are unwrapped (if they are persistent objects and they register automatically because they have been modified):
Assigning to an object's attribute (or accessing an object's attribute) effectively works on "aq_base". This implies (among others) that the "self" of "__getattr__" and "__setattr__" are unwrapped. It also implies that (automatically) registered objects are unwrapped.
Ok, but I wasn't talking about storing wrappers or relying on the object being wrapped at all. Just storing the physical path (string or tuple) at some opportune point (probably at a higher level in the application) when the object was modified. Then given this path and the application object (which you could get to from _p_jar), you could recreate the wrapper if you needed it. -Casey