Unzip: Memory Error

David Bolen db3l.net at gmail.com
Thu Aug 30 23:27:29 CEST 2007


I wrote:

> Here's a small example of a ZipFile subclass (tested a bit this time)
> that implements two generator methods:

Argh, not quite tested enough - one fix needed, change:

            if bytes[-1] not in ('\n', '\r'):
                partial = lines.pop()

to:

            if bytes[-1] not in ('\n', '\r'):
                partial = lines.pop()
            else:
                partial = ''

(add the extra two lines)

-- David



More information about the Python-list mailing list