Antoine Pitrou <pit...@free.fr> added the comment:

> Here is an updated patch that adds read1() to BZ2File. This should fix things
> for issue10791 from the bz2 side. I also took the opportunity to clean up
> _read_block() to be more readable. As per Martin's suggestion on python-dev, I
> put the copyright notice in the patch header, rather than in the code itself.

Thank you! A couple of comments:
- please avoid C++-style comments ("// ..."), some compilers don't like
them
- BZ2Decompressor.eof would be better as a T_BOOL than a T_INT, IMO
- BZ2Decompressor.eof should be documented as new in 3.3
- instead of using PyObject_GetBuffer(), I think it's better to call
PyArg_ParseTuple with the "y*" typecode: it makes sure it does the right
thing
- instead of "int(size)", use "size = size.__index__()" so as to forbid
floats

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5863>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to