[Python-Dev] struct.pack inconsistencies between platforms

Paul Moore p.f.moore at gmail.com
Sun Feb 26 15:30:46 CET 2012


On Sun, Feb 26, 2012 at 3:16 PM, Eli Bendersky <eliben at gmail.com> wrote:
> 7.2.3.1 says, shortly after the first table:
>
> "
>
> Native size and alignment are determined using the C compiler’s sizeof
> expression. This is always combined with native byte order.
>
> Standard size depends only on the format character; see the table in the
> Format Characters section.
>
> "
>
> To me this appears to be a reasonable definition of what "standard size"
> is.

You're right, my apologies. I skimmed a little too much. Actually, I
*could* argue that there is still some ambiguity, but as (a) the OP is
happy, and (b) until I went and read the docs, I would have expected
the current behaviour anyway, that would just just be me being
awkward. So I won't :-)

Paul.


More information about the Python-Dev mailing list