[Zope3-dev] Getting the parent object

Stephan Richter srichter@cbu.edu
Sat, 30 Mar 2002 10:51:21 -0600


At 04:46 PM 3/30/2002 +0000, Steve Alexander wrote:
>Stephan Richter wrote:
>>Hello everyone,
>>In the last two days I had several times the urgent need to get to the 
>>parent of an object, but now that we do not use Acquisition anymore, I 
>>cannot use aq_parent, or can I? Also, based on the new structure, it 
>>seems that based on the implementation of a container, getting the parent 
>>is not always the same.
>>Unless there is a way to get back to the parent otherwise, I propose that 
>>we set a __parent__ attribute in an object, when it is added to the 
>>container. Therefore, all containers are required to implement that feature.
>>Please comment!
>
>Inspect the ContextWrapper.

Okay, so are we guaranteed that objects are always returned in wrapped 
form? When is the wrapping done?

Regards,
Stephan

--
Stephan Richter
CBU - Physics and Chemistry Student
Web2k - Web Design/Development & Technical Project Management