[ZPT] Using PTFiles in Python Products
Chris Withers
chrisw@nipltd.com
Sun, 14 Jul 2002 10:08:57 +0100
"Michael R. Bernstein" wrote:
>
> The contained objects are stored with an acquisition wrapper, and the
> same goes for acquired objects (returned by getattr). The only case I
> can think of that wouldn't be covered would be getattr returning a
> simple attribute (not a persistent object) such as a title. I don't
> think that wrapping those in an acquisition wrapper is appropriate
> either, But I could be wrong.
Nah, I think you're right :-)
> In any case, as I posted in reply to Dieter, once I fixed the stupid
> mistake I made with defining the PTFile, my acquisition problems went
> away.
Ah, okay, missed that bit...
> > what case does this 'return self' handle?
>
> As I understand it (because I modified this code from Karl's), this
> handles the case of there not being any subobjects to traverse, ie, the
> object is itself being accessed.
Hmmm, if the object itself is due to be returned, what would be in the 'name'
parameter of the call to __bobo_traverse__?
(I don't think this last bit is necessary, but I don't see it causing any
problems in any case ;-)
cheers,
Chris