About deletion of variables in version 2.1

Aahz Maruch aahz at panix.com
Mon Mar 11 11:43:30 EST 2002


In article <a6b34h$foj$1 at talia.mad.ttd.net>,
Juan Huertas <jhg at galdon.com> wrote:
>
>I'm working with large list or dict an have problems with the deletion and
>time of response, this problems does not exist in version 2.0:
>
>Reading a large file and loading to a list:
>
>f=open('c:/xx','rb')
>ls=[]
>while not eof:
>    ln=f.readline()
>    ls.append(ln)
>
>This takes 5 seconds (reasonable)
>
>The new instruction:
>
>ls=[] # or del ls
>
>Takes about 10 seconds and use 100% of Memory!!!!

How big is the file and how much RAM do you have?
-- 
                      --- Aahz  <*>  (Copyright 2002 by aahz at pobox.com)

Hugs and backrubs -- I break Rule 6                 http://www.rahul.net/aahz/
Androgynous poly kinky vanilla queer het Pythonista

"Argue for your limitations, and sure enough they're yours."  --Richard Bach



More information about the Python-list mailing list