]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-65002: Make note that null bytes are used to pad bytes (#98635)
authorStanley <46876382+slateny@users.noreply.github.com>
Fri, 28 Oct 2022 10:21:28 +0000 (03:21 -0700)
committerGitHub <noreply@github.com>
Fri, 28 Oct 2022 10:21:28 +0000 (12:21 +0200)
Doc/library/struct.rst

index d12a5732fa4a0df52f600437ab495457beb13f3e..620f50376beb62e01ddb7e8fb6c96595125bb63a 100644 (file)
@@ -194,7 +194,7 @@ platform-dependent.
 +--------+--------------------------+--------------------+----------------+------------+
 | Format | C Type                   | Python type        | Standard size  | Notes      |
 +========+==========================+====================+================+============+
-| ``x``  | pad byte                 | no value           |                |            |
+| ``x``  | pad byte                 | no value           |                | \(7)       |
 +--------+--------------------------+--------------------+----------------+------------+
 | ``c``  | :c:expr:`char`           | bytes of length 1  | 1              |            |
 +--------+--------------------------+--------------------+----------------+------------+
@@ -291,6 +291,9 @@ Notes:
    operations. See the Wikipedia page on the `half-precision floating-point
    format <half precision format_>`_ for more information.
 
+(7)
+   For padding, ``x`` inserts null bytes.
+
 
 A format character may be preceded by an integral repeat count.  For example,
 the format string ``'4h'`` means exactly the same as ``'hhhh'``.