This can be used to package message data. Each of the keyword args given at construction will be stored as a member of the ‘data’ member of instance. E.g. “m=Message2(a=1, b=’b’)” would succeed “assert m.data.a==1” and “assert m.data.b==’b’”. However, use of Message2 makes your messaging code less documented and harder to debug.
StructMsg
¶This can be used to package message data. Each of the keyword args given at construction will be stored as a member of the ‘data’ member of instance. E.g. “m=Message2(a=1, b=’b’)” would succeed “assert m.data.a==1” and “assert m.data.b==’b’”. However, use of Message2 makes your messaging code less documented and harder to debug.
__init__
(self, **kwargs)¶