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.

Author hannes.reuter
Recipients hannes.reuter, mark.dickinson, theller
Date 2010-07-15.13:59:26
SpamBayes Score 0.00011353105
Marked as misclassified No
Message-id <AANLkTikt1WUETf9OtumWqh-fVfC9VyZ8ptUHsfseTLIn@mail.gmail.com>
In-reply-to <1279133991.81.0.16058318543.issue9249@psf.upfronthosting.co.za>
Content
Hi Mark,

If you would add a footnote to the L/l formats table and mention what
you wrote, it would make things clearer. Something along the lines
like that I reformulated from your explanation:

On most common platforms the 'l' and 'L' codes are the only ones
likely to differ due to formating differences between Native and
Little are. The Size for 'l' and 'L' on a typical 64-bit Unix-alike
platform will be 8 for 'l' and 'L'; on 64-bit Windows and most 32-bit
platforms, it's 4.   This is due to the fact that in Native mode
native size, native byteorder and alignment will be set, while with a
Little endian formating standard size, little-endian, no alignment
will be set.
<<

Cheers Hannes

On 7/14/10, Mark Dickinson <report@bugs.python.org> wrote:
>
> Mark Dickinson <dickinsm@gmail.com> added the comment:
>
>> However, as my system is a little endian one(e.g.
>> sys.byteorder=little), whats the difference between native and little
>
> Native mode uses:  native size, native byteorder and alignment that
>   matches your platform
> Little endian: standard size, little-endian, no alignment
>
> The *native* size means the size of the corresponding C type (e.g., as
> computed by sizeof) on your platform.  So on a typical 64-bit Unix-alike
> platform, that's 8 for 'l' and 'L'; on 64-bit Windows and most 32-bit
> platforms, it's 4 for 'l' and 'L'.
>
> The *standard* size is as given by the table.  It's the same on all
> platforms.
>
> It's true that on most common platforms the 'l' and 'L' codes are the only
> ones likely to differ.
>
>> b) Where could I look up/find such a native format table ?
> Why not just use struct.calcsize?
>
> This is all explained in the docs;  I'm going to close this issue, since I
> don't think there's any discrepancy between the docs and the behaviour of
> the module.
>
> However, if you have ideas for specific improvements to the documentation,
> please do open another issue.
>
> ----------
> status: open -> closed
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue9249>
> _______________________________________
>
History
Date User Action Args
2010-07-15 13:59:28hannes.reutersetrecipients: + hannes.reuter, theller, mark.dickinson
2010-07-15 13:59:27hannes.reuterlinkissue9249 messages
2010-07-15 13:59:26hannes.reutercreate