From 9cbf369bbcd141063ab172ed69dbd888f1386365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 28 Jan 2023 13:44:50 +0100 Subject: [PATCH] Struct --- README.md | 3 +-- index.html | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a501de5..370c6ab 100644 --- a/README.md +++ b/README.md @@ -1988,11 +1988,10 @@ Struct ------ * **Module that performs conversions between a sequence of numbers and a bytes object.** * **System’s type sizes, byte order, and alignment rules are used by default.** -* **The only exception being types float and double, that always take up 4 and 8 bytes.** ```python from struct import pack, unpack - = pack('', [, ...]) # Packages arguments into bytes object. + = pack('', [, ...]) # Packages arguments or raises struct.error. = unpack('', ) # Use iter_unpack() for iterator of tuples. ``` diff --git a/index.html b/index.html index 4ecdf57..6802cb5 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -1648,9 +1648,8 @@ CompletedProcess(args=['bc', #Struct
  • Module that performs conversions between a sequence of numbers and a bytes object.
  • System’s type sizes, byte order, and alignment rules are used by default.
  • -
  • The only exception being types float and double, that always take up 4 and 8 bytes.
from struct import pack, unpack
-<bytes> = pack('<format>', <el_1> [, ...])  # Packages arguments into bytes object.
+<bytes> = pack('<format>', <el_1> [, ...])  # Packages arguments or raises struct.error.
 <tuple> = unpack('<format>', <bytes>)       # Use iter_unpack() for iterator of tuples.
 
@@ -2924,7 +2923,7 @@ $ pyinstaller script.py --add-data '<path>:.'