Skip to content

Commit ae90a21

Browse files
committed
Struct
1 parent fc1186c commit ae90a21

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,6 +1988,7 @@ Struct
19881988
------
19891989
* **Module that performs conversions between a sequence of numbers and a bytes object.**
19901990
* **System’s type sizes, byte order, and alignment rules are used by default.**
1991+
* **The only exception being types float and double, that always take up 4 and 8 bytes.**
19911992

19921993
```python
19931994
from struct import pack, unpack

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,7 @@
16481648
<div><h2 id="struct"><a href="#struct" name="struct">#</a>Struct</h2><ul>
16491649
<li><strong>Module that performs conversions between a sequence of numbers and a bytes object.</strong></li>
16501650
<li><strong>System’s type sizes, byte order, and alignment rules are used by default.</strong></li>
1651+
<li><strong>The only exception being types float and double, that always take up 4 and 8 bytes.</strong></li>
16511652
</ul><pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> struct <span class="hljs-keyword">import</span> pack, unpack
16521653
&lt;bytes&gt; = pack(<span class="hljs-string">'&lt;format&gt;'</span>, &lt;el_1&gt; [, ...]) <span class="hljs-comment"># Packages arguments into bytes object.</span>
16531654
&lt;tuple&gt; = unpack(<span class="hljs-string">'&lt;format&gt;'</span>, &lt;bytes&gt;) <span class="hljs-comment"># Use iter_unpack() for iterator of tuples.</span>

0 commit comments

Comments
 (0)