[Python-Dev] idea for data-type (data-format) PEP
alexander.belopolsky at gmail.com
Sat Nov 4 18:13:28 CET 2006
On Nov 4, 2006, at 3:15 AM, Martin v. Löwis wrote:
> Alexander Belopolsky schrieb:
>> Multi-segment buffers are only dead because standard library modules
>> do not support them.
> That, in turn, is because nobody has contributed code to make that
> My guess is that people either don't need it, or find it too difficult
> to implement.
Last time I tried to contribute code related to buffer protocol, it
was rejected with little discussion
that patch implemented two features: enabled creation of read-write
buffer objects and added readinto method to StringIO.
The resolution was:
The file object's readinto method is not meant for public
use, so adding the method to StringIO is not a good idea.
The read-write buffer part was not discussed, but I guess the
resolution would be that buffer objects are deprecated, so adding
features to them is not a good idea.
> If you are curious, try adding such a feature to re some time. I
> expect that implementing it would be quite involved. I wonder what
> Fredrik Lundh thinks about providing such a feature.
I would certainly invest some time into that if that feature had a
chance of being accepted. At the moment I feel that anything related
to buffers or buffer protocol is met with strong opposition. I think
the opposition is mostly fueled by the belief that buffer objects are
"unsafe" and buffer protocol is deprecated. None of these premises
is correct AFAIK.
More information about the Python-Dev