#!/usr/local/bin/python2 import cPickle as pickle class C(object): def __init__(self, a): self.a = a c = C(1) c4 = c z = pickle.dumps(c) c2 = pickle.loads(z) c3 = pickle.loads(z) print id(c), id(c2), id(c3), id(c4) c2.a = 2 c.a = 4 print c.a, c2.a, c3.a, c4.a