[issue10212] struct.unpack and cStringIO.StringIO don't support new buffer

Éric Araujo report at bugs.python.org
Thu Oct 28 15:52:11 CEST 2010


Éric Araujo <merwok at netwok.org> added the comment:

MAL’s viewpoint from msg119721:

“The memoryview object was added to simplify porting applications to Python3. If that backport is incomplete in the sense that the memoryview object is not compatible with the standard Python2 object for such memory views, then I'd consider that a bug.

Without compatibility to the buffer objects, there's no way to make other Python2 buffer interface compatible object compatible to memoryviews.

Alternatively, the Python2 memoryview object implementation could also accept objects with the old buffer interface, much like "s*" does.

Note that the patch needs to check the buffer flags - writing to such buffers is not allowed.”

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10212>
_______________________________________


More information about the Python-bugs-list mailing list