Package gavo :: Package base :: Module complexattrs :: Class PropertyAttribute
[frames] | no frames]

Class PropertyAttribute

source code

          object --+        
                   |        
attrdef.AttributeDef --+    
                       |    
           DictAttribute --+
                           |
                          PropertyAttribute

adds the property protocol to the parent instance.

The property protocol consists of the methods - setProperty(name, value), - getProperty(name, default=Undefined) - clearProperty(name) - hasProperty(name)

getProperty works like dict.get, except it will raise a KeyError without a default.

This is provided for user information and, to some extent, some DC-internal purposes.

Instance Methods
 
__init__(self, description='Properties (i.e., user-defined key-value pairs) for the eleme..., **kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
iterParentMethods(self)
returns an iterator over (name, method) pairs that should be inserted in the parent class.
source code
 
makeUserDoc(self) source code

Inherited from DictAttribute: create, feedObject, getCopy, iterEvents

Inherited from attrdef.AttributeDef: doCallbacks, feed

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from DictAttribute: default_, typeDesc_

Inherited from object: __class__

Method Details

__init__(self, description='Properties (i.e., user-defined key-value pairs) for the eleme..., **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

iterParentMethods(self)

source code 

returns an iterator over (name, method) pairs that should be inserted in the parent class.

Overrides: attrdef.AttributeDef.iterParentMethods
(inherited documentation)

makeUserDoc(self)

source code 
Overrides: attrdef.AttributeDef.makeUserDoc