[Zope] ZPT - getting at an object's parent

Joel Burton joel@joelburton.com
Thu, 14 Mar 2002 14:10:53 -0500 (EST)


On Thu, 14 Mar 2002, Tom Nixon wrote:

> How do I get at the attributes of an object's parent?
>
> I cannot use acquisition because the current object might have an
> attribute of the same name.

to get property "spam" of the parent of object "foo":

foo.aq_parent.spam

-- 

Joel BURTON  |  joel@joelburton.com  |  joelburton.com  |  aim: wjoelburton
Independent Knowledge Management Consultant