[Zope] Of Containers, Objects and Properties

Dan Shafer pydan@danshafer.com
Tue, 16 Jul 2002 10:21:24 -0700


I have a folder containing multiple DTML Method objects. The folder has 
some properties. Each DTML method has its own set of properties that are 
different from those of the folder. Everything is being generated 
dynamically by Python scripts.

When I query the folder for its propertyItems as in:

print context.propertyItems

called with the folder as the context, I get a list of all the properties 
in the folder *and* in all of its contained DTML Method objects. Not what I 
had in mind. Worse, when I call the same script using one of the documents 
in the folder as the context, I *still* get returned a list of all the 
properties in the folder and all of its contained DTML methods.

Is there some inheritance or traversal going on here? Is this expected 
behavior? If not, does this behavior indicate I've assigned properties 
incorrectly or some such thing?

Dan Shafer, Chief Scribe and Tablet Keeper
PythonCard Open Source Project
http://pythoncard.sourceforge.net