Class DictAttribute
source code
object --+
|
attrdef.AttributeDef --+
|
DictAttribute
- Known Subclasses:
-
an attribute containing a mapping.
DictAttributes are fairly complex beasts supporting a number of input
forms.
The input to those looks like <d key="foo">abc</d>; they are constructed
with an itemAttD (like StructAttributes), but the name on those
is ignored; they are just used for parsing from the strings in the
element bodies, which means that itemAttDs must be derived from
AtomicAttribute.
You can give a different keyNames; the key attribute is always
accepted, though.
For sufficiently exotic situations, you can construct DictAttributes
with inverted=True; the resulting dictionary will then have the keys as
values and vice versa (this is a doubtful feature; let us know when
you use it).
You can also add to existing values using the cumulate XML attribute;
<d key="s">a</d><d key="s" cumulate="True">bc</a> will leave
abc in s.
|
__init__(self,
name,
description=' Undocumented ' ,
itemAttD=<gavo.base.attrdef.UnicodeAttribute object>,
keyName=' key ' ,
inverted=False,
**kwargs)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from attrdef.AttributeDef :
doCallbacks ,
feed ,
iterParentMethods
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|
__init__(self,
name,
description=' Undocumented ' ,
itemAttD=<gavo.base.attrdef.UnicodeAttribute object>,
keyName=' key ' ,
inverted=False,
**kwargs)
(Constructor)
| source code
|
x.__init__(...) initializes x; see help(type(x)) for signature
- Overrides:
object.__init__
- (inherited documentation)
|
typeDesc_
- Get Method:
- unreachable.typeDesc_(self)
|
default_
- Get Method:
- unreachable.default_(self)
|