Skip to content

Commit 2199a7d

Browse files
gh-65002: Make note that null bytes are used to pad bytes (GH-98635)
(cherry picked from commit 8cd21c2) Co-authored-by: Stanley <[email protected]>
1 parent e0df94d commit 2199a7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Doc/library/struct.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ platform-dependent.
194194
+--------+--------------------------+--------------------+----------------+------------+
195195
| Format | C Type | Python type | Standard size | Notes |
196196
+========+==========================+====================+================+============+
197-
| ``x`` | pad byte | no value | | |
197+
| ``x`` | pad byte | no value | | \(7) |
198198
+--------+--------------------------+--------------------+----------------+------------+
199199
| ``c`` | :c:expr:`char` | bytes of length 1 | 1 | |
200200
+--------+--------------------------+--------------------+----------------+------------+
@@ -291,6 +291,9 @@ Notes:
291291
operations. See the Wikipedia page on the `half-precision floating-point
292292
format <half precision format_>`_ for more information.
293293

294+
(7)
295+
For padding, ``x`` inserts null bytes.
296+
294297

295298
A format character may be preceded by an integral repeat count. For example,
296299
the format string ``'4h'`` means exactly the same as ``'hhhh'``.

0 commit comments

Comments
 (0)