[Python-Dev] idea for data-type (data-format) PEP

"Martin v. Löwis" martin at v.loewis.de
Sat Nov 4 09:15:44 CET 2006

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 work.
My guess is that people either don't need it, or find it too difficult
to implement.

In any case, it is an important point that such a specification is
likely dead if the standard library doesn't support it throughout,
from start. So for this PEP, the same criterion likely applies: it's
not sufficient to specify an interface, one also has to specify
(and then implement) how that affects modules and types of the
standard library.

> I often work with text data that is represented
> as an array of strings.  I would love to implement a multi-segment
> buffer interface on top of that data and be able to do a full text
> regular expression search without having to concatenate into one big
> string, but python's re module would not take a multi-segment buffer.

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.


More information about the Python-Dev mailing list