https://github.com/python/cpython/commit/2516dd0d06754e5ddef080cc02386688c2fc1ba6
commit: 2516dd0d06754e5ddef080cc02386688c2fc1ba6
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: encukou <[email protected]>
date: 2026-01-15T09:34:21+01:00
summary:

[3.13] gh-143834: Fix PyLong_AsNativeBytes docs for negative number padding  
(GH-143840) (GH-143855)

(cherry picked from commit 421bd1770a87d141f66754ae29e407589e44ce83)

Co-authored-by: Muneeb Ullah <[email protected]>

files:
M Doc/c-api/long.rst

diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst
index 2d70f46f3e4897..1dbd6b37c6a2b2 100644
--- a/Doc/c-api/long.rst
+++ b/Doc/c-api/long.rst
@@ -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,

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to