[New-bugs-announce] [issue17345] Portable and extended type specifiers for array module

Nikita Nemkin report at bugs.python.org
Mon Mar 4 09:26:17 CET 2013


New submission from Nikita Nemkin:

Currently array module only provides platform-dependent type specifiers.
It would be very nice to have platform-independent specifiers in addition to that, matching the struct module.
For example array('<H') -> an array of little-endian 2-byte integers.

This issue crops up every time when I use array(). Binary data usually comes in some predefined format and a manual matching to native format has to be done (assuming I want to write portable code).

A useful extra would be to support multi-element struct specifiers and present an array of tuples in this case.
For example array('iff') -> an array of tuples (int, float, float) with native types.

----------
components: Library (Lib)
messages: 183425
nosy: nnemkin
priority: normal
severity: normal
status: open
title: Portable and extended type specifiers for array module
type: enhancement
versions: Python 3.4

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


More information about the New-bugs-announce mailing list