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-14.13:16:25
SpamBayes Score 0.0028174822
Marked as misclassified No
Message-id <AANLkTimvdFjqnO7pltdr7bkNbQdbS6hHrMNVk9xrY9s7@mail.gmail.com>
In-reply-to <1279051036.14.0.17698051549.issue9249@psf.upfronthosting.co.za>
Content
Dear Marc,

Thanks for taking time to answer that question. I understand that this
comes from the native formating i specified,
>>> calcsize('L')
8
>>> calcsize('<L')
4

So if written with < or = it is 4 bytes, clear.

However, as my system is a little endian one(e.g.
sys.byteorder=little), whats the difference between native and little
?  I understand that Alignment is not performed on the Native format,
a) but why is only L/l shows a difference compared to the
table(docu)/formated output in the in native format , while the rest
agrees one to one ?
b) Where could I look up/find such a native format table ?

Probably you can answer that easily to me, I'm just really,really puzzled.

Hannes

for x in list:
... 	print x,calcsize(x),calcsize('<'+x)
...
x 1 1
c 1 1
b 1 1
B 1 1
? 1 1
h 2 2
H 2 2
i 4 4
I 4 4
l 8 4
L 8 4
q 8 8
Q 8 8
f 4 4
d 8 8
s 1 1
p 1 1

'little'

On 7/13/10, Mark Dickinson <report@bugs.python.org> wrote:
>
> Mark Dickinson <dickinsm@gmail.com> added the comment:
>
> Please read the three sentences directly preceding that table and tell me
> whether they clear this up for you.
>
> ----------
> assignee: theller -> mark.dickinson
> nosy: +mark.dickinson
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue9249>
> _______________________________________
>
History
Date User Action Args
2010-07-14 13:16:27hannes.reutersetrecipients: + hannes.reuter, theller, mark.dickinson
2010-07-14 13:16:25hannes.reuterlinkissue9249 messages
2010-07-14 13:16:25hannes.reutercreate