Home | Trees | Indices | Help |
|
---|
|
object --+ | ConfigItem --+ | StringConfigItem --+ | ListConfigItem --+ | DictConfigItem
A config item that contains a concise representation of a string-string mapping.
The literal format is {<key>:<value>,}, where whitespace is ignored between tokens and the last comma may be ommitted.
No commas and colons are allowed within keys and values. To lift this, I'd probably go for backslash escaping.
>>> ci = DictConfigItem("foo"); ci.value {} >>> ci.set("ab:cd, foo:Fu\xc3\x9f"); ci.value {u'ab': u'cd', u'foo': u'Fu\xdf'} >>> ci.getAsString();ci.set(ci.getAsString()); ci.value 'ab:cd, foo:Fu\xc3\x9f, ' {u'ab': u'cd', u'foo': u'Fu\xdf'} >>> ci.set("ab:cd, rubbish") Traceback (most recent call last): ParseError: 'rubbish' is not a valid mapping literal element
Instance Methods | |
Inherited from Inherited from |
Class Variables | |
typedesc =
|
|
default = "" hash(x) |
Properties | |
Inherited from |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |