[issue5863] bz2.BZ2File should accept other file-like objects. (issue4274045)
Nadeem Vawda
report at bugs.python.org
Mon Mar 14 16:33:11 CET 2011
Nadeem Vawda <nadeem.vawda at gmail.com> added the comment:
> Would it be possible to add an open() function to the bz2 module?
Yes, it would be quite trivial, though I don't think it would be worthwhile -
all it would do is provide a direct alias for the BZ2File constructor. But as
Antoine said, that is a topic for a separate issue.
@Antoine:
Regarding the use of PY_SSIZE_T_CLEAN, I assume that Py_ssize_t is to be
preferred over plain ssize_t. Is this correct?
Also, I was wondering whether I need to add some sort of license boilerplate to
the beginning of bz2.py? With _bz2module.c, I presume I should retain the
copyright information from the old bz2module.c. Would something like this be ok?
/* _bz2 - Low-level Python interface to libbzip2.
*
* Copyright (c) 2011 Nadeem Vawda <nadeem.vawda at gmail.com>
*
* Based on bz2module.c:
*
* Copyright (c) 2002 Gustavo Niemeyer <niemeyer at conectiva.com>
* Copyright (c) 2002 Python Software Foundation; All Rights Reserved
*/
(Browsing through the source files in Lib/ and Modules/, there doesn't seem to
be a clear convention for this sort of thing...)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5863>
_______________________________________
More information about the Python-bugs-list
mailing list