At 02:39 PM 11/12/99 +0000, Ty Sarna wrote:
In article <3.0.5.32.19991111184711.0132deb0@telecommunity.com>, Phillip J. Eby <pje@telecommunity.com> wrote:
Actually, here's an unusual manner in which you can do what you want (mostly). :)
[snip __of__'ing a wrapper trick]
This is a very ugly kludge, and there are aspects that may not work 100% correctly. What it does is stick a wrapper around your persistent object which converts __getattr__ to try __getitem__ first. The kludgy part is
What worries me about thich technique is that other code may break, assuming that it's dealing with the true object (or an acquisition wrapper, which presumably all Zope code already takes into account ;-)
Not really, since this is the "true object", it just is a bit more complex than usual. :) If another object stores a reference to it, however, they may not get exactly what they intended upon later un-pickling. :(