RE: struct size confusion:

2006-03-22 Thread Michael Yanowitz
), but I am content that it is working now. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Fredrik Lundh Sent: Wednesday, March 22, 2006 9:28 AM To: python-list@python.org Subject: Re: struct size confusion: Michael Yanowitz wrote: >I am relatively n

Re: struct size confusion:

2006-03-22 Thread Fredrik Lundh
Michael Yanowitz wrote: >I am relatively new to Python and this is my first post on > this mailing list. > >I am confused as to why I am getting size differences in the following > cases: > > >>> print struct.calcsize("I") > 4 > >>> print struct.calcsize("H") > 2 > >>> print struct.calcsiz

Re: struct size confusion:

2006-03-22 Thread Kent Johnson
Michael Yanowitz wrote: > Hello: > >I am relatively new to Python and this is my first post on > this mailing list. > >I am confused as to why I am getting size differences in the following > cases: > > print struct.calcsize("I") > > 4 > print struct.calcsize("H") > > 2 > >>

Re: struct size confusion:

2006-03-22 Thread Diez B. Roggisch
Michael Yanowitz wrote: >Why is it 8 bytes in the third case and why would it be only 6 bytes > in the last case if it is 8 in the previous? >From TFM: """ Native size and alignment are determined using the C compiler's sizeof expression. This is always combined with native byte order. Sta