<div dir="ltr">Sounds reasonable for me. Thanks!<br><br><div class="gmail_quote">On Sun, Feb 26, 2012 at 3:16 PM, Eli Bendersky <span dir="ltr">&lt;<a href="mailto:eliben@gmail.com">eliben@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div class="h5"><br><br><div class="gmail_quote">On Sun, Feb 26, 2012 at 15:09, Paul Moore <span dir="ltr">&lt;<a href="mailto:p.f.moore@gmail.com" target="_blank">p.f.moore@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On 26 February 2012 12:34, Eli Bendersky &lt;<a href="mailto:eliben@gmail.com" target="_blank">eliben@gmail.com</a>&gt; wrote:<br>
&gt; On Sun, Feb 26, 2012 at 12:33, pmon mail &lt;<a href="mailto:pmon.mail@gmail.com" target="_blank">pmon.mail@gmail.com</a>&gt; wrote:<br>
</div><div>&gt;&gt; Documentation clearly states that the &#39;L&#39; is a 4 byte integer.<br>
&gt;&gt;<br>
&gt;&gt; Is this a bug? I&#39;m I missing something?<br>
&gt;&gt;<br>
&gt;<br>
&gt; By default pack uses native size, not standard size. On a 64-bit machine:<br>
<br>
</div>As the OP points out, the documentation says that the &quot;Standard Size&quot;<br>
is 4 bytes (<a href="http://docs.python.org/library/struct.html" target="_blank">http://docs.python.org/library/struct.html</a>). While<br>
&quot;Standard Size&quot; doesn&#39;t appear to be defined in the documentation, and<br>
the start of the previous section (7.3.2.1. Byte Order, Size, and<br>
Alignment) clearly states that C types are represented in native<br>
format by default, the documentation could probably do with some<br>
clarification.<br>
<span></span><br></blockquote></div><br></div></div>7.2.3.1 says, shortly after the first table:<br><br>&quot;
<p>Native size and alignment are determined using the C compiler’s
<tt><span>sizeof</span></tt> expression.  This is always combined with native byte order.</p>
<p>Standard size depends only on the format character;  see the table in
the <a href="http://docs.python.org/library/struct.html#format-characters" target="_blank"><em>Format Characters</em></a> section.</p>&quot;<br><br>To me this appears to be a reasonable definition of what &quot;standard size&quot; is. <br>


<br>7.3.2.2 says before the size table:<br><br>&quot;Format characters have the following meaning; the conversion between C and
Python values should be obvious given their types.  The ‘Standard size’ column
refers to the size of the packed value in bytes when using standard size; that
is, when the format string starts with one of <tt><span>&#39;&lt;&#39;</span></tt>, <tt><span>&#39;&gt;&#39;</span></tt>, <tt><span>&#39;!&#39;</span></tt> or
<tt><span>&#39;=&#39;</span></tt>.  When using native size, the size of the packed value is
platform-dependent.&quot;<br><br>Again, taken together with the previous quote, IMHO this defines the difference between standard and native sizes clearly. If you feel differently, feel free to open an issue suggesting a better explanation.<span class="HOEnZb"><font color="#888888"><br>


<br>Eli<br><br><br><br></font></span></div>
</blockquote></div><br></div>