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 <rep...@bugs.python.org>
<http://bugs.python.org/issue17345>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to