class tClass(object): def __init__(self, x): self.x = x def double(self): self.x += self.xt = tClass (5)print t.__dict__print tClass.__dict__print t.xt.double()print t.x