On Thu, Mar 24, 2011 at 11:06:14AM +0530, Vishal wrote: > setting l[0] to None, un-references the earlier string data associated with > that name, which is then (force) collected by the collect() call.
Can you please elaborate this further? I don't see such behavior in this snippet. >>> l [10, 20, 30] >>> sys.getsizeof(l) 104 >>> l[0] = None >>> import gc >>> gc.collect() 0 >>> sys.getsizeof(l) 104 >>> l[0] = range(1000) >>> sys.getsizeof(l) 104 >>> l[0] = None >>> gc.collect() 0 >>> sys.getsizeof(l) 104 -- Senthil _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers