[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
files: newbuffer.patch
keywords: needs review, patch
messages: 119687
nosy: krisvale
priority: normal
severity: normal
status: open
title: struct.unpack and cStringIO.StringIO don't support new buffer
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file19382/newbuffer.patch

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


More information about the New-bugs-announce mailing list