Skip to content

Commit 2583485

Browse files
committed
Add padding note to footnote of Format Characters
1 parent 5e74bad commit 2583485

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Doc/library/struct.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ The module defines the following exception and functions:
6161
write the packed bytes into the writable buffer *buffer* starting at
6262
position *offset*. Note that *offset* is a required argument.
6363

64-
6564
.. function:: unpack(format, buffer)
6665

6766
Unpack from the buffer *buffer* (presumably packed by ``pack(format, ...)``)
@@ -194,7 +193,7 @@ platform-dependent.
194193
+--------+--------------------------+--------------------+----------------+------------+
195194
| Format | C Type | Python type | Standard size | Notes |
196195
+========+==========================+====================+================+============+
197-
| ``x`` | pad byte | no value | | |
196+
| ``x`` | pad byte | no value | | \(7) |
198197
+--------+--------------------------+--------------------+----------------+------------+
199198
| ``c`` | :c:expr:`char` | bytes of length 1 | 1 | |
200199
+--------+--------------------------+--------------------+----------------+------------+
@@ -291,6 +290,9 @@ Notes:
291290
operations. See the Wikipedia page on the `half-precision floating-point
292291
format <half precision format_>`_ for more information.
293292

293+
(7)
294+
For padding, ``x`` inserts null bytes.
295+
294296

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

0 commit comments

Comments
 (0)