Source

dictionary_switches / code / Messenger / MessengerIdiom.py

1
2
3
4
5
6
7
8
9
# Messenger/MessengerIdiom.py

class Messenger:
    def __init__(self, **kwargs):
        self.__dict__ = kwargs

m = Messenger(info="some information", b=['a', 'list'])
m.more = 11
print m.info, m.b, m.more