I have a class defined as follows
class M(object): def __init__(self, **kwargs): ...do_something
and I have the result of
You need to pass in the result of vars(args) instead:
vars(args)
M(**vars(args))
The vars() function returns the namespace of the Namespace instance (its __dict__ attribute) as a dictionary.
__dict__
Inside M.__init__(), simply ignore the message_type key.
M.__init__()
message_type