PyOpenWorm.pProperty module¶
-
class
PyOpenWorm.pProperty.Property(name=False, owner=False, **kwargs)[source]¶ Bases:
PyOpenWorm.contextualize.Contextualizable,PyOpenWorm.data.DataUserStore a value associated with a DataObject
Properties can be be accessed like methods. A method call like:
a.P()
for a property
Pwill return values appropriate to that property fora, the owner of the property.Parameters: - owner : PyOpenWorm.dataObject.DataObject
The owner of this property
- name : string
The name of this property. Can be accessed as an attribute like:
owner.name
-
get(self, *args)[source]¶ Get the things which are on the other side of this property
The return value must be iterable. For a
getthat just returns a single value, an easy way to make an iterable is to wrap the value in a tuple like(value,).Derived classes must override.