[New-bugs-announce] [issue10212] struct.unpack and cStringIO.StringIO don't support new buffer
Kristján Valur Jónsson
report at bugs.python.org
Wed Oct 27 12:36:53 CEST 2010
New submission from Kristján Valur Jónsson <kristjan at ccpgames.com>:
When doing socket IO, it is beneficial to use a bytearra() and then using sock.recv_into() to avoid moving data about.
However, many useful functions still don't accept new style buffers, such as the bytearray and memoryview. In particular, the struct module cannot unpack from them, and the StringIO doesn't accept them as input.
The attached patch adds new-buffer support to the struct module and cStringIO.
components: Interpreter Core
keywords: needs review, patch
title: struct.unpack and cStringIO.StringIO don't support new buffer
versions: Python 2.7
Added file: http://bugs.python.org/file19382/newbuffer.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce