Package gavo :: Package base :: Module meta :: Class ComputedMetaMixin
[frames] | no frames]

Class ComputedMetaMixin

source code

object --+    
         |    
 MetaMixin --+
             |
            ComputedMetaMixin
Known Subclasses:

A MetaMixin for classes that want to implement defaults for unresolvable meta items.

If getMeta would return a NoMetaKey, this mixin's getMeta will check the presence of a _meta_<key> method (replacing dots with two underscores) and, if it exists, returns whatever it returns. Otherwise, the exception will be propagated.

The _meta_<key> methods should return MetaItems; if something else is returned, it is wrapped in a MetaValue.

On copying such metadata, the copy will retain the value on the original if it has one. This does not work for computed metadata that would be inherited.

Instance Methods
 
getMetaKeys(self) source code

Inherited from MetaMixin: __init__, addMeta, buildRepr, copyMetaFrom, delMeta, getAllMetaPairs, getMeta, getMetaParent, isEmpty, iterMeta, keys, makeOriginal, setMeta, setMetaParent, traverse

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

Properties

Inherited from object: __class__

Method Details

getMetaKeys(self)

source code 
Overrides: MetaMixin.getMetaKeys