This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: New byte packing format for the struct module
Type: enhancement Stage: patch review
Components: Extension Modules Versions: Python 3.2
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: mark.dickinson Nosy List: mark.dickinson, meador.inge, razeh
Priority: normal Keywords: patch

Created on 2007-07-07 16:31 by razeh, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
struct-patch.txt razeh, 2007-07-07 16:31 Patch for network byte ordering but native packing
Messages (2)
msg52811 - (view) Author: Robert Zeh (razeh) Date: 2007-07-07 16:31
Added a new byte packing format to the struct module for network ordered structures but native packing.
msg107791 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-06-14 15:14
Is this still of interest to anyone?

What's the motivation for this particular choice (bigendian byteorder, native size, native alignment), out of all the various other choices that aren't currently implemented?

PEP 3118 also proposes the addition of a new format, '^', for (native byteorder, native size, no alignment).

There are 12 possible different formats (big/little/native byteorder * standard/native size * none/native padding), of which 4 are currently implemented (native**3, big*standard*none, little*standard*none, native*standard*none).  Of the 8 missing formats, it's not clear to me why either of the new proposed formats should be a particular target.

BTW, not that it really matters, but I've earmarked '$' for a different use, so I'm mildly opposed to its use here.
History
Date User Action Args
2022-04-11 14:56:25adminsetgithub: 45157
2010-06-29 21:01:16mark.dickinsonsetstatus: pending -> closed
2010-06-22 15:18:04mark.dickinsonsetstatus: open -> pending
resolution: rejected
2010-06-14 15:14:19mark.dickinsonsetnosy: + meador.inge
messages: + msg107791
2010-06-14 14:34:05mark.dickinsonsetassignee: mark.dickinson

nosy: + mark.dickinson
versions: + Python 3.2, - Python 3.1, Python 2.7
2009-04-06 10:32:08ajaksu2setstage: patch review
type: enhancement
versions: + Python 3.1, Python 2.7, - Python 2.6
2007-07-07 16:31:29razehcreate