Looks good. I only have one paranoid comment: since the tests use self.TEXT * 5
to create multiple streams, the ordering of the files is not tested. IOW, the
code could mix-up the order of the files and the tests would not catch that. Is
it a concern?
http://bugs.python.org/review/1625/diff/2695/6526
File Lib/bz2.py (right):
http://bugs.python.org/review/1625/diff/2695/6526#newcode409
Lib/bz2.py:409: result += decomp.decompress(data)
Is this efficient? I understood that other Python implementations had poorly
performing str.__iadd__, and therefore that using a list was the common idiom
(using “return b''.join(result)” at the end).
http://bugs.python.org/review/1625/diff/2695/6527
File Lib/test/test_bz2.py (right):
http://bugs.python.org/review/1625/diff/2695/6527#newcode99
Lib/test/test_bz2.py:99: # "Test BZ2File.read() with a multi stream archive"
The comment seems unnecessary, as the method name is clear enough. (I see that
the existing code has those weird-looking, redundant comments, but you don’t
have to do the same.)
http://bugs.python.org/review/1625/diff/2695/6527#newcode142
Lib/test/test_bz2.py:142: while 1:
while True:
Issue 1625: bz2.BZ2File doesn't support multiple streams
Created 2 years ago by therve_free.fr
Modified 2 years ago
Reviewers: eric.araujo
Base URL: None
Comments: 3