>>> i2.__dict__['q'] = 'some string' >>> i2.q 'some string' >>> dir(i2) ['__doc__', '__init__', '__module__', 'i', 'j', 'k', 'q', 'write']