[issue17742] Add _PyBytesWriter API
STINNER Victor
report at bugs.python.org
Sun Apr 21 01:09:12 CEST 2013
STINNER Victor added the comment:
> The patch contains a special case for writing only one bytes object.
> This is very unlikely case.
The patch only modify a few functions to make them use the new _PyBytesWriter API. Other functions can use it.
A few examples:
- PyBytes_FromObject()
- binascii: binascii_rledecode_hqx()
- bz2, lzma and zlib modules
- marshal and pickle modules
- datetime.datetime.strftime()
- Python/compile.c: assemble_lnotab()
- more Unicode decoders
But I agree that the readonly "hack" can be removed from _PyBytesWriter API since the bytes type has no format method (no bytes%args nor bytes.format(args)).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17742>
_______________________________________
More information about the Python-bugs-list
mailing list