A MsgTree object maps key objects to multi-lines messages. MsgTree's
are mutable objects. Keys are almost arbitrary values (must be hashable).
Message lines are organized as a tree internally. MsgTree provides low
memory consumption especially on a cluster when all nodes return similar
messages. Also, the gathering of messages is done automatically.
|
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
clear(self)
Remove all items from the MsgTree. |
source code
|
|
|
__len__(self)
Return the number of keys contained in the MsgTree. |
source code
|
|
|
|
|
get(self,
key,
default=None)
Return the message for key if key is in the MsgTree, else default. |
source code
|
|
|
add(self,
key,
msgline)
Add a message line associated with the given key to the MsgTree. |
source code
|
|
|
keys(self)
Return an iterator over MsgTree's keys. |
source code
|
|
|
__iter__(self)
Return an iterator over MsgTree's keys. |
source code
|
|
|
messages(self,
match=None)
Return an iterator over MsgTree's messages. |
source code
|
|
|
items(self,
match=None,
mapper=None)
Return (key, message) for each key of the MsgTree. |
source code
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|