No title Revision 643264316633 (Fri Nov 18 2011 at 13:52) - Diff Link to this snippet: https://friendpaste.com/1cZ2DQRkfIu0CI44oI5i16 Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 123456789101112131415161718192021# -*- coding: utf-8 -*-class Wrapper(object): def __init__(self): self._object = {} def update(self, **kw): self._object = kw def __getattr__(self, attr): return self._object[attr]class Test(Wrapper): def __init__(self): self._object = {'name': 'toto'}t = Test()t.update(name='tata')print t.name