High memory usage - program mistake or Python feature?

Ben S bens at replytothegroupplease.com
Sat May 24 15:34:31 EDT 2003


Hmm, in quick experiments with using xreadlines instead of readlines,
there is obviously the problem that while a single iteration over either
container works the same way, in order to repeat iterations over
xreadlines I need to somehow reset the iterator, which a quick look at
the documentation doesn't show me how to do. How do I do this, so that
my functions can take a list of lines without caring whether those lines
are in memory or coming from xreadlines?

--
Ben Sizer
http://pages.eidosnet.co.uk/kylotan






More information about the Python-list mailing list