Skip to content

Commit 8da196f

Browse files
moneebullah25miss-islington
authored andcommitted
gh-143834: Fix PyLong_AsNativeBytes docs for negative number padding (GH-143840)
(cherry picked from commit 421bd17) Co-authored-by: Muneeb Ullah <moneebullah25@gmail.com>
1 parent 5c028df commit 8da196f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/c-api/long.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ distinguished from a number. Use :c:func:`PyErr_Occurred` to disambiguate.
403403
404404
Otherwise, returns the number of bytes required to store the value.
405405
If this is equal to or less than *n_bytes*, the entire value was copied.
406-
All *n_bytes* of the buffer are written: large buffers are padded with
407-
zeroes.
406+
All *n_bytes* of the buffer are written: remaining bytes filled by
407+
copies of the sign bit.
408408
409409
If the returned value is greater than *n_bytes*, the value was
410410
truncated: as many of the lowest bits of the value as could fit are written,

0 commit comments

Comments
 (0)