On Mon, Mar 16, 2009 at 12:30 PM, A.T.Hofkamp <a.t.hofk...@tue.nl> wrote:
> I don't know what code is executed in an assignment exactly, but > **possibly**, first the 'read()' is executed (thus loading a very big string > into memory), before assigning the value to the variable (which releases the > previous value of the variable). > That means that just after reading but before assigning, you **may** have > two very big strings in memory that cannot be garbage collected. No. Python variables are references to values, not containers for values. Python assignment is *always* reference assignment, not copying of a value. More here; http://personalpages.tds.net/~kent37/kk/00012.html Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor