]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-143834: Fix PyLong_AsNativeBytes docs for negative number padding (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 15 Jan 2026 08:34:21 +0000 (09:34 +0100)
committerGitHub <noreply@github.com>
Thu, 15 Jan 2026 08:34:21 +0000 (09:34 +0100)
(cherry picked from commit 421bd1770a87d141f66754ae29e407589e44ce83)

Co-authored-by: Muneeb Ullah <moneebullah25@gmail.com>
Doc/c-api/long.rst

index 2d70f46f3e4897869805e325a8e7232a0252cccb..1dbd6b37c6a2b22eff3d5759c455531c0f1045f2 100644 (file)
@@ -403,8 +403,8 @@ distinguished from a number.  Use :c:func:`PyErr_Occurred` to disambiguate.
 
    Otherwise, returns the number of bytes required to store the value.
    If this is equal to or less than *n_bytes*, the entire value was copied.
-   All *n_bytes* of the buffer are written: large buffers are padded with
-   zeroes.
+   All *n_bytes* of the buffer are written: remaining bytes filled by
+   copies of the sign bit.
 
    If the returned value is greater than *n_bytes*, the value was
    truncated: as many of the lowest bits of the value as could fit are written,