On Tue, Mar 17, 2009 at 6:34 AM, A.T.Hofkamp <a.t.hofk...@tue.nl> wrote:
>> http://personalpages.tds.net/~kent37/kk/00012.html > > Nice web-page! Thanks! > You can do the above statements also iteratively of course > > for i in ... > s = read() > # write s > > but since the loop does nothing with either s or read(), this will not > change how the assignment works. > > > In the case that you are manipulating large values (as in taking a lot of > computer memory for each value), the execution of the read() during step 3 > may fail due to memory being used for the previously assigned value of s. Ah, thanks, I misunderstood the point you were making. You can allow the previous value of s to be garbage-collected by assigning s=None, for example: for i in ... s = read() # process s s = None Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor