PyOpenWorm.pProperty module

class PyOpenWorm.pProperty.Property(name=False, owner=False, **kwargs)[source]

Bases: PyOpenWorm.contextualize.Contextualizable,

Store a value associated with a DataObject

Properties can be be accessed like methods. A method call like:


for a property P will return values appropriate to that property for a, the owner of the property.

owner : PyOpenWorm.dataObject.DataObject

The owner of this property

name : string

The name of this property. Can be accessed as an attribute like:

Get the things which are on the other side of this property

The return value must be iterable. For a get that 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.


Returns true if the Property has any values set on it.

This may be defined differently for each property


Returns a single value for the Property whether or not it is multivalued.

set(*args, **kwargs)[source]

Set the value of this property

Derived classes must override.

class PyOpenWorm.pProperty.PropertyMeta(name, bases, dct)[source]

Bases: PyOpenWorm.contextualize.ContextualizableClass